Skip to content

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

Closed
@camelid

Description

@camelid

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions