Skip to content

Resolve "Static Site Editor Flattens Mixed Lists"

Enrique Alcántara requested to merge 243758-indent-two-spaced-lists into master

What does this MR do?

Background

  • The Static Site Editor product uses Toast UI as our Markdown WYSIWYG editor.
  • Toast UI can understand Markdown that strictly follows the CommonMark specification.

The CommonMark spec dictates that nested lists should be indented at least one space more than the length of the parent’s list marker, for example:

1. This is a list item
  - this is a sublist incorrectly indented because it only has two spaces and the list marker length is 2 as well

1. This is another list item
   - This list is correctly indented because it uses three spaces.

So what does this do?

When the Static Site Editor encounters a nested list with improper indentation, it flattens the nested list. By flattening, I mean that the editor moves the nested list one level up. To address this problem, this Merge Request adds a transformation function that fixes lists that are incorrectly indented.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #243758 (closed)

Closes #243758 (closed)

Edited by Enrique Alcántara

Merge request reports