Replies: 1 comment 1 reply
-
See the manual on
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
I'm having trouble to decide for a proper MD-structure in order to convert it to docx and html
I am using markdown in order to document my work. The documents are structured with headings, all topmost headings begin with
#
.Example, just a compressed excerpt:
The logical structure expresses the sections of the article and (imo) is perfectly valid.
When converting to docx, the headings are at the proper level and the styles are applied correctly - everything is fine.
To embed the same md as html, I'm using Parsedown and adjusted it a bit in order to render the toc.
In the output, the
#…
are replaced withh
+ the number of#
(similar to pandoc).The result is a document, which contains several
<h1>
elements (for each main heading).Since web-developer is not my primary job, I was not aware about problems this could cause when it comes to screenreaders and document outlining. This came up after Markdownlint complained about multiple level 1-headers. I've read several articles about this:
This more or less led me to the conclusion, that using multiple
<h1>
is discouraged in this case.At the same time this would mean, that - when indenting "properly" - the wiki-article converted from md would have only one top-level heading, which not only feels very awkward, but indenting with an additional
#
leads to incorrect docx.I guess the easiest solution would be to adjust the MD-parser in order to indent the headings one more level for html,
what are your thoughts about this?
Beta Was this translation helpful? Give feedback.
All reactions