Checkbox cannot be checked if preceded by a blockquote
What does this MR do?
We use the CommonMark SOURCEPOS
flag to map lines in the source markdown to the rendered HTML. We then use that to determine which checkbox has been clicked and which line of source it belongs to.
However, when using the GitLab specific blockquote syntax,
>>>
some quoted text
>>>
- [ ] one
- [ ] two
the line numbers no longer match. This is because we add >
in front of the quoted text, and remove the two marker lines. Which changes the number of lines of source. Since that is what is run through CommonMark, the line numbers are generated against that source, not the original user source. Making the line number incorrect.
This MR replaces those blockquote fences with \n
, keeping the line numbering intact.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry [ ] Documentation created/updated or follow-up review issue created-
Code review guidelines -
Merge request performance guidelines -
Style guides [ ] Database guides[ ] Separation of EE specific content
Performance and testing
-
Tests added for this feature/bug -
Tested in all supported browsers [ ] End to end tests added if this MR has ~"Requires e2e tests" label
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 #58717 (closed)