Skip to content

Commit 810c790

Browse files
committed
placate lint
Signed-off-by: Andrew Thornton <[email protected]>
1 parent ca3573d commit 810c790

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/content/doc/advanced/external-renderers.en-us.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f rst"
7474
IS_INPUT_FILE = false
7575
```
7676

77-
If your external markup relies on additional classes and attributes on the generated HTML elements, you might need to enable custom sanitizer policies. Gitea uses the [`bluemonday`](https://godoc.org/github.com/microcosm-cc/bluemonday) package as our HTML sanitizier. The example below will support [KaTeX](https://katex.org/) output from [`pandoc`](https://pandoc.org/).
77+
If your external markup relies on additional classes and attributes on the generated HTML elements, you might need to enable custom sanitizer policies. Gitea uses the [`bluemonday`](https://godoc.org/github.com/microcosm-cc/bluemonday) package as our HTML sanitizier. The example below could be used to support server-side [KaTeX](https://katex.org/) rendering output from [`pandoc`](https://pandoc.org/).
7878

7979
```ini
8080
[markup.sanitizer.TeX]
8181
; Pandoc renders TeX segments as <span>s with the "math" class, optionally
8282
; with "inline" or "display" classes depending on context.
83+
; - note this is different from the built-in math support in our markdown parser which uses <code>
8384
ELEMENT = span
8485
ALLOW_ATTR = class
8586
REGEXP = ^\s*((math(\s+|$)|inline(\s+|$)|display(\s+|$)))+

web_src/js/markup/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {renderMermaid} from './mermaid.js';
2-
import {renderMath} from './katex.js';
2+
import {renderMath} from './math.js';
33
import {renderCodeCopy} from './codecopy.js';
44
import {initMarkupTasklist} from './tasklist.js';
55

web_src/js/markup/math.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function renderMath() {
2828

2929
try {
3030
const markup = katex.renderToString(source, options);
31-
const target = document.createElement(options.display ? 'p' : 'span')
31+
const target = document.createElement(options.display ? 'p' : 'span');
3232
target.innerHTML = markup;
3333
if (el.classList.contains('is-loading')) {
3434
el.replaceWith(target);

0 commit comments

Comments
 (0)