Skip to content

Codeblock in --format=md Generates HTML #3237

@AlexAntonides

Description

@AlexAntonides

When I use the dartdoc --format=md command on the following example,

/// A class that uses a markdown example.
///
/// ```dart
/// Foo.example()
/// ```
class Foo {
    [...]
}

The following "markdown" is generated:

# Foo
<p>A class that uses a markdown example.</p>
<pre class="language-dart"><code class="language-dart">Foo.example()
</code></pre>

This however is just a mix between Markdown and HTML. I understand that some markdown renderers are capable of rendering HTML, I'd rather have the markdown format generate actual markdown instead, like the following result:

# Foo
A class that uses a markdown example.
'''dart
Foo.example()
'''

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requesttype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions