Skip to content
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

rustdoc: Syntax highlighting doesn't work for TOML and YAML #76685

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

rustdoc: Syntax highlighting doesn't work for TOML and YAML #76685

camelid opened this issue Sep 13, 2020 · 2 comments
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

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;kbknapp@gmail.com&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;someone_else@other.com&gt;
        args:
            - debug:
                short: d
                help: print debug information
</code></pre>

@rustbot modify labels: T-rustdoc C-bug

@rustbot rustbot added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 13, 2020
@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.

@ollie27
Copy link
Member

ollie27 commented Sep 14, 2020

Duplicate of #43165

@ollie27 ollie27 marked this as a duplicate of #43165 Sep 14, 2020
@ollie27 ollie27 closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants