When a fenced code block has no language, or has a language not supported by the Chroma syntax highlighter, highlighting options such as style, lineNos, and tabWidth are not available in .Options within a code block render hook. They appear in .Attributes instead.
For example:
```{style=monokai class=my-class tabWidth=8}
fmt.Println("foo")
```
Expected: class is available in .Attributes, while tabWidth and style are available in .Options
Actual: They all appear in .Attributes. The .Options map is empty.
This issue blocks the intended application of #11872.
Note that this change breaks the "cheat" that I described here:
https://discourse.gohugo.io/t/change-language-in-highlightcodeblock/47724/4
That "cheat" is a work around for the current behavior described in this issue. At the time I wrote that, I should have logged a bug instead.
When a fenced code block has no language, or has a language not supported by the Chroma syntax highlighter, highlighting options such as
style,lineNos, andtabWidthare not available in.Optionswithin a code block render hook. They appear in.Attributesinstead.For example:
Expected:
classis available in.Attributes, whiletabWidthandstyleare available in.OptionsActual: They all appear in
.Attributes. The.Optionsmap is empty.This issue blocks the intended application of #11872.
Note that this change breaks the "cheat" that I described here:
https://discourse.gohugo.io/t/change-language-in-highlightcodeblock/47724/4
That "cheat" is a work around for the current behavior described in this issue. At the time I wrote that, I should have logged a bug instead.