diff --git a/bikeshed/highlight.py b/bikeshed/highlight.py index 6ba1a1af42..c2f6e7b8cb 100644 --- a/bikeshed/highlight.py +++ b/bikeshed/highlight.py @@ -44,7 +44,7 @@ def addSyntaxHighlighting(doc: t.SpecT) -> None: for el in h.findAll("xmp, pre, code", doc): # Find whether to highlight, and what the lang is lang = determineHighlightLang(doc, el) - if lang is False: + if lang is False: # or lang is None: # Element was already highlighted, but needs styles highlightingOccurred = True elif lang: diff --git a/docs/index.bs b/docs/index.bs index e79e9af8a2..0aa4db1b7c 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -1748,7 +1748,7 @@ Just add either a `highlight="foo"` attribute or a `lang-foo` class to the element, or set a [=Default Highlight=] metadata, and the element will automatically be syntax-highlighted according to the "foo" language rules. -(Setting `no-highlight` closer will turn if off for an element; +(Setting `nohighlight` closer will turn if off for an element; it looks for the closest ancestor with one of the attributes.) The syntax highlighter uses Pygments, which supports a large set of languages. diff --git a/tests/pre003.bs b/tests/pre003.bs index c431f55fde..0b7bd1c169 100644 --- a/tests/pre003.bs +++ b/tests/pre003.bs @@ -106,3 +106,17 @@ Line Numbers: yes readonly attribute DOMString type; }; + +