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

Escaping contents tabs #335

Closed
talwgx opened this issue Aug 26, 2024 · 1 comment · Fixed by #338
Closed

Escaping contents tabs #335

talwgx opened this issue Aug 26, 2024 · 1 comment · Fixed by #338
Labels

Comments

@talwgx
Copy link

talwgx commented Aug 26, 2024

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/)

@robinst
Copy link
Collaborator

robinst commented Sep 12, 2024

Thanks for raising. I think this should fix it: #338

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

Successfully merging a pull request may close this issue.

2 participants