Fix LaTeX formatting for AsciiDoc wiki
What does this MR do?
It fixes LaTeX formatting for AsciiDoc documents. It introduces AsciiPipeline
(is uses same filters as MardownPipeline
that was used before + AsciiPostProcessFilter). data-math-style
is whitelisted in SanitiationFilter for pre
and code
elements. Classes necessary to format LaTeX code are added in AsciiPostProcessFilter
for elements with data-math-style
attribute present.
Are there points in the code the reviewer needs to double check?
In the original code we used
%(<code#{id_attribute(node)} class="code math js-render-math #{node.role}" data-math-style="inline">#{node.text}</code>)
I think that we don't use node.role
for formatting but not 100% sure.
Why was this MR needed?
We removed class
attribute from whitelist in SanitizationFilter
because of security. But class
is used to format LaTeX code.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #29852 (closed)