arve0 / markdown-it-attrs

Add classes, identifiers and attributes to your markdown with {} curly brackets, similar to pandoc's header attributes
MIT License
300 stars 58 forks source link

Unable to add multiple classes for <hr> #131

Closed tlylt closed 3 years ago

tlylt commented 3 years ago

This is an issue template. Fill in your problem description here, replacing this text. Below you should include examples.

Markdown-it versions: ├── markdown-it-attrs@4.1.0 ├── markdown-it@12.2.0

Example input:

--- {.green .red}

Current output:

<hr class="green" class="red">

Expected output:

<hr class="green red">
arve0 commented 3 years ago

Hi 👋 Thanks for reporting. Can confirm the behavior.

As this plugin does not render HTML, I believe the issue is with markdown-it, not markdown-it-attrs. Correct me if I'm wrong.

You can read more about rendering in the README, and also at markdown-it documentation: https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer

tlylt commented 3 years ago

Hi 👋 Thanks for reporting. Can confirm the behavior.

As this plugin does not render HTML, I believe the issue is with markdown-it, not markdown-it-attrs. Correct me if I'm wrong.

You can read more about rendering in the README, and also at markdown-it documentation: https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer

Thank you for the quick response! Will close this issue and look into markdown-it instead.