Skip to main content
added 146 characters in body
Source Link
Henry Ecker Mod
  • 35.5k
  • 4
  • 59
  • 89

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). 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 chosein favour of the tags on the question specifically since it has a specified Code Language lang-rust. In the case of multiple tags that have specified Code Languages it "lets highlight.js infer what's the best language to use."

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 to be lang-toml which would fix this issue everywhere it's currently being used and moving forward (any future usage).

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). 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 .

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 to be lang-toml which would fix this issue moving forward.

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). doesn't have a Code Language (used for syntax highlighting) defined so it was ignored in favour of the tags on the question specifically since it has a specified Code Language lang-rust. In the case of multiple tags that have specified Code Languages it "lets highlight.js infer what's the best language to use."

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 to be lang-toml which would fix this issue everywhere it's currently being used and moving forward (any future usage).

Slight correction to how the syntax highlighting was chosen
Source Link
Henry Ecker Mod
  • 35.5k
  • 4
  • 59
  • 89

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). doesn't have a Code Language (used for syntax highlighting) defined so the code block defaulted to the highlighting of the question which isit was ignored and triggered highlight.js's automatic language detection. In this case, it chose .

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 to be lang-toml which would fix this issue moving forward.

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). doesn't have a Code Language (used for syntax highlighting) defined so the code block defaulted to the highlighting of the question which is .

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 to be lang-toml which would fix this issue moving forward.

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). 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 .

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 to be lang-toml which would fix this issue moving forward.

Swapped out image for code block since lang-toml works even on meta
Source Link
Henry Ecker Mod
  • 35.5k
  • 4
  • 59
  • 89

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). doesn't have a Code Language (used for syntax highlighting) defined so the code block defaulted to the highlighting of the question which is .

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): Code snippet using lang-toml instead of toml renders correctly

[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 to be lang-toml which would fix this issue moving forward.

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). doesn't have a Code Language (used for syntax highlighting) defined so the code block defaulted to the highlighting of the question which is .

I've edited the the answer to use the explicit lang-toml notation:

```lang-toml

and it now renders as expected: Code snippet using lang-toml instead of toml renders correctly

It may be helpful to have a mod add the Code language for to be lang-toml which would fix this issue moving forward.

The shorthand hinting works by looking at the corresponding tag's syntax highlighting (source). doesn't have a Code Language (used for syntax highlighting) defined so the code block defaulted to the highlighting of the question which is .

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 to be lang-toml which would fix this issue moving forward.

Source Link
Henry Ecker Mod
  • 35.5k
  • 4
  • 59
  • 89
Loading