highlight.js
highlight.js copied to clipboard
(cmake) Folders starting by a number highlighted incorrectly
Describe the issue Folders starting by a number are highlighted incorrectly in CMake.
Exemple:
Notice how the 3 at the beginning of 3rdparty is highlighted differently.
Which language seems to have the issue?
cmake
Are you using highlight or highlightAuto?
Ayu highlighting through mdbook... I don't know sorry.
Sample Code to Reproduce
project(my_app)
# example of folder structure
add_subdirectory(3rdparty/libremidi)
add_executable(my_app src/main.cpp)
target_link_libraries(my_app PRIVATE libremidi)
Expected behavior File names in CMake function calls are highlighted normally.
I wonder if something like this would be sufficeint:
{
...hljs.NUMBER_MODE,
begin: /\b\d+(\.\d+)?\b/
}
IE, just use a \b word boundary.