gsantner / markor

Text editor - Notes & ToDo (for Android) - Markdown, todo.txt, plaintext, math, ..
https://github.com/gsantner/markor/discussions/2269
Other
3.83k stars 368 forks source link

Don't generate id attribute BOTH on header and header anchor link upon html export #2045

Closed Daryadi-S closed 1 year ago

Daryadi-S commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Description

When export to html, Markor will generate id attribute with same value both on both header and link tag:

## The Header

Resulted in

<h2 id="the-header"><a href="#the-header" id="the-header" class="header_no_underline">The Header</a></h2>

AFAIK, this is invalid in HTML as id attribute is unique and there should be only one id attribute value in an HTML document.

Thank you.

Information

Android version: 10 Device: ASUS ZenFone LIVE L2 App Version: Marder version 2.10.8-1928

Source

F-Droid

Format / File type

Markdown

Additional info / Log

-
gsantner commented 1 year ago

Markor uses flexmark to parse Markdown, thus to create the html. https://github.com/vsch/flexmark-java/wiki/Extensions.