Skip to content

Escaping contents tabs  #335

Description

@talwgx

Steps to reproduce the problem (provide example Markdown if applicable):

Try to load and render an example from: https://squidfunk.github.io/mkdocs-material/reference/content-tabs/

The CoreMarkdownNodeRenderer.visit(Text text) method will escape it and prevent the content tabs from rendering correctly because it suspects them to be Setext Headers, the comment says: "Would be ambiguous with a Setext heading, escape"

Is it possible to allow the content tab headers to render correctly without being escaped?

=== "C"

    ``` c
    #include <stdio.h>

    int main(void) {
      printf("Hello world!\n");
      return 0;
    }
    ```

=== "C++"

    ``` c++
    #include <iostream>

    int main(void) {
      std::cout << "Hello world!" << std::endl;
      return 0;
    }
    ```

Expected behavior:

expected HTML

Actual behavior:

actual HTML

(Also see what the reference implementation does: https://spec.commonmark.org/dingus/)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions