mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
rename 'theme' that is shadowing an import (#473)
This commit is contained in:
parent
e325977653
commit
503e56db40
@ -17,7 +17,7 @@ export function buildHighlightedCode(
|
|||||||
): HTMLElement {
|
): HTMLElement {
|
||||||
const highlighter = ace.acequire('ace/ext/static_highlight');
|
const highlighter = ace.acequire('ace/ext/static_highlight');
|
||||||
const PythonMode = ace.acequire('ace/mode/python').Mode;
|
const PythonMode = ace.acequire('ace/mode/python').Mode;
|
||||||
const theme = ace.acequire('ace/theme/chrome');
|
const aceTheme = ace.acequire('ace/theme/chrome');
|
||||||
const mode = new PythonMode();
|
const mode = new PythonMode();
|
||||||
|
|
||||||
return cssHighlightedCode(
|
return cssHighlightedCode(
|
||||||
@ -32,7 +32,7 @@ export function buildHighlightedCode(
|
|||||||
codeText = lines.slice(0, options.maxLines).join("\n") + " \u2026"; // Ellipsis
|
codeText = lines.slice(0, options.maxLines).join("\n") + " \u2026"; // Ellipsis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elem.innerHTML = highlighter.render(codeText, mode, theme, 1, true).html;
|
elem.innerHTML = highlighter.render(codeText, mode, aceTheme, 1, true).html;
|
||||||
} else {
|
} else {
|
||||||
elem.textContent = options.placeholder || '';
|
elem.textContent = options.placeholder || '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user