The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). toml doesn't have a Code Language (used for syntax highlighting) defined so it was ignored and triggered highlight.js's automatic language detection. In this case, it chose rust.
I've edited the the answer to use the explicit lang-toml
notation:
```lang-toml
and it now renders as expected (since lang-toml
is one of the available languages on Stack Exchange):
[profile.release] opt-level = 'z' # Optimize for size. lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations. panic = 'abort' # Abort on panic strip = true # Strip symbols from binary*
It may be helpful to have a mod add the Code language for toml to be lang-toml
which would fix this issue moving forward.