mirror of
https://github.com/wassname/template.git
synced 2026-08-16 11:29:40 +08:00
Resolve errors from merge + move math styles
This commit is contained in:
+1
-1
@@ -25,4 +25,4 @@ JSDOM.fromFile(program.input, options).then(dom => {
|
||||
|
||||
const transformedHtml = dom.serialize();
|
||||
process.stdout.write(transformedHtml);
|
||||
});
|
||||
}).catch(console.error);
|
||||
|
||||
@@ -20,18 +20,6 @@ const T = Template('d-math', `
|
||||
display: block;
|
||||
}
|
||||
|
||||
#katex-container .katex-display {
|
||||
text-align: left;
|
||||
padding: 8px 0 8px 0;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
#katex-container .katex {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-size: 1.18em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
${katexCSSTag}
|
||||
|
||||
@@ -187,6 +187,18 @@ d-figure {
|
||||
|
||||
/* KaTeX */
|
||||
|
||||
d-article .katex-display {
|
||||
text-align: left;
|
||||
padding: 8px 0 8px 0;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
d-article .katex {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-size: 1.18em;
|
||||
}
|
||||
|
||||
.katex, .katex-prerendered {
|
||||
contain: content;
|
||||
display: inline-block;
|
||||
|
||||
@@ -6,6 +6,7 @@ export default function(dom, data) {
|
||||
const article = dom.querySelector('d-article');
|
||||
|
||||
if (data.katex && data.katex.delimiters) {
|
||||
global.document = dom;
|
||||
renderMathInElement(article, data.katex);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user