mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 04:08:43 +00:00
Implemented `\href' command (#923)
* Implements `\href' command. * Added `functions/href.js`. * Added `domTree.anchor` and `buildCommon.makeAnchor` functions. * Make `buildHTML.getTypeOfDomTree` exported. * Reflects the code reviews * Create new argType "url" to treat link string in math appropriately * Stop using too shorten variable names * Start using template strings * Adopts template literal * Elaborates on glueing * If-clause restructuring * Solved confusing explanation * Allow balanced braces in url * Adds unit-test for \href * Adds snapshot tests
This commit is contained in:
committed by
Kevin Barabash
parent
75af19c5bb
commit
fd82c4fad0
@@ -220,6 +220,25 @@ exports[`A MathML builder should render mathchoice as if there was nothing 4`] =
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder should set href attribute for href appropriately 1`] = `
|
||||
|
||||
<math>
|
||||
<semantics>
|
||||
<mrow>
|
||||
<mrow href="http://example.org">
|
||||
<mi>
|
||||
α
|
||||
</mi>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<annotation encoding="application/x-tex">
|
||||
\\href{http://example.org}{\\alpha}
|
||||
</annotation>
|
||||
</semantics>
|
||||
</math>
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder should use <menclose> for colorbox 1`] = `
|
||||
|
||||
<math>
|
||||
|
Reference in New Issue
Block a user