Skip to content

Syntax highlighting doesn't work for TOML and YAML #1047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
camelid opened this issue Sep 13, 2020 · 3 comments
Closed

Syntax highlighting doesn't work for TOML and YAML #1047

camelid opened this issue Sep 13, 2020 · 3 comments

Comments

@camelid
Copy link
Member

camelid commented Sep 13, 2020

Here are some examples:

Docs for structopt

Rendered

image

DOM

<pre><code class="language-toml">[dependencies]
structopt = { version = &quot;0.3&quot;, features = [ &quot;paw&quot; ] }
paw = &quot;1.0&quot;
</code></pre>

Docs for clap

Rendered

image

DOM

<pre><code class="language-yaml">name: myapp
version: &quot;1.0&quot;
author: Kevin K. &lt;[email protected]&gt;
about: Does awesome things
args:
    - config:
        short: c
        long: config
        value_name: FILE
        help: Sets a custom config file
        takes_value: true
    - INPUT:
        help: Sets the input file to use
        required: true
        index: 1
    - verbose:
        short: v
        multiple: true
        help: Sets the level of verbosity
subcommands:
    - test:
        about: controls testing features
        version: &quot;1.3&quot;
        author: Someone E. &lt;[email protected]&gt;
        args:
            - debug:
                short: d
                help: print debug information
</code></pre>
@camelid
Copy link
Member Author

camelid commented Sep 13, 2020

Based on the DOM, it seems like it's being propagated as the correct language (not plaintext or something), but it's not actually being highlighted.

@camelid
Copy link
Member Author

camelid commented Sep 13, 2020

Actually this seems to be a rustdoc bug, it looks like it's occurring locally too.

@camelid camelid closed this as completed Sep 13, 2020
@camelid
Copy link
Member Author

camelid commented Sep 13, 2020

Filed rust-lang/rust#76685.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant