aboutsummaryrefslogtreecommitdiff
path: root/lib/document-to-html.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-06-13 11:52:30 +0100
committerMichael Williamson <mike@zwobble.org>2024-06-13 11:52:30 +0100
commit66c9ef99816708cb1ffedd3ec37e5622bf823c20 (patch)
tree10e640bcda8b6ecd92a7486a9d700366cf40f239 /lib/document-to-html.js
parent700e395a3d2a0c9f6526fe7c69a92bd347fa1b88 (diff)
Support style mapping for highlights
Diffstat (limited to 'lib/document-to-html.js')
-rw-r--r--lib/document-to-html.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index 32e8b03..bd845f6 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -127,6 +127,12 @@ function DocumentConversion(options, comments) {
return convertElements(run.children, messages, options);
};
var paths = [];
+ if (run.highlight !== null) {
+ var path = findHtmlPath({type: "highlight", color: run.highlight});
+ if (path) {
+ paths.push(path);
+ }
+ }
if (run.isSmallCaps) {
paths.push(findHtmlPathForRunProperty("smallCaps"));
}