Skip to content

Rendering of Markdown Extra's Special Attributes #137

@deruss

Description

@deruss

Great product! Thank you.

I've used Google Docs to export markdown files into a website. This works well but for one issue: Adding a table of contents.

Unfortunately, Google Docs will automatically add an curly-braced anchor to every header.

For example, Google Docs will generate this:

TOC:
[My Heading 1](#my-heading-1)
[My Heading 2](#my-heading-2)
[My Heading 3](#my-heading-3)

## My Heading 1 {#my-heading-1}
## My Heading 2 {#my-heading-2}
## My Heading 3 {#my-heading-3}

When rendered in zero-md, this will cause the curly braces content to appear on the heading lines (ie. "My Heading 1 {#my-heading-1}").

Image

This syntax appears to be part of the Markdown Extra's 'Special attributes': https://michelf.ca/projects/php-markdown/extra/#spe-attr

Markdown will automatically generate id anchors for headings, so this extra syntax from the Google Docs export is unnecessary, but cannot be disabled.

Could zero-md have an option to either support, or strip out, Markdown Extra special attributes?

It would mean not needing to post-process .md files exported from Google Docs with each update.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions