Closed CyrusYip closed 1 year ago
yes, it's a problem, I wiil think about if there is a good solution. Thank you for your feedback! 😃
It would fall back to "fallback" language when guessSyntax = true
is set in config file.
[markup]
[markup.highlight]
guessSyntax = true
@oe7drt Your solution works. Thank you.
Solution: https://github.com/xianmin/hugo-theme-jane/issues/343#issuecomment-1242673329
I use hugo v0.99.1.
Reproducible example:
Visit
http://localhost:43909/hugo-theme-jane/post/syntax-highlighting/
in your browser (change43909
into the port used by your system).Code blocks with language look normal. Those without language look weird.
The example file is
exampleSite/content/post/syntax-highlighting.md
.Excerpt
```` ```scala object HelloWorld with Application { Console.println("Hello, World!"); } ``` ```php ``` ```python print("Hello, World!") ``` ## no named code block ``` ## this is a comment $ echo this is a command this is a command ## edit the file $vi foo.md +++ date = "2014-09-28" title = "creating a new theme" +++ bah and humbug :wq ## show it $ cat foo.md +++ date = "2014-09-28" title = "creating a new theme" +++ bah and humbug $ ``` ````