Fenced code syntax highlighting not working when language flag has leading/trailing whitespaces
Please confirm that you have searched existing issues in the repo
Yes, I have searched the existing issues
Any related issues?
No response
Tell us about your environment
MacOS 15.3 / Windows 11
MarkBind version
5.5.3
Describe the bug and the steps to reproduce it
For example, "```python" is correctly recognized. "``` python " however, is not recognised and the resulting fenced code block does not show syntax highlighting.
Expected behavior
The markdown-it implementation automatically removes leading and trailing whitespaces when parsing the flag.
Anything else?
I wonder whether this is a design choice of MarkBind.
I have attempted to trace through the processing flow within the markdown-it part using the debugger, adding breakpoints in "node_modules/markdown-it/lib/rules_block/fence.js" and "node_modules/markdown-it/lib/renderer.js", but I do not quite understand how token.info is further processed by MarkBind for syntax highlighting. (@lhw-1 )