Resolve "Static Site Editor Flattens Mixed Lists"
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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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