You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
data = markdown2.markdown(data, extras=["header-ids"]) lets header-ids work in the output data, in that HTML headers have their id attribute. data = markdown2.markdown(data, extras=["use-file-vars"]) while data starts with <!-- markdown-extras: header-ids --> doesn't let header-ids work; headers are devoid of an id attribute.
I dunno what's wrong here, I'm just saying what I've seen.
The text was updated successfully, but these errors were encountered:
The data that is passed into the markdown2.markdown function is unprocessed markdown. Y'know, underscores and such. You presumably know enough python to understand that the data in data = markdown2... is an output HTML file.
Let data be
<!-- markdown-extras: header-ids -->
# Header
When that is passed in to markdown2.markdown(data, extras=["use-file-vars"]), the output is
Header
(I just noticed that there's an empty line after the attempt at telling the file to use header-ids. Something's happened...) There is no id attribute to the h1 tag, so header-ids hasn't worked!!
However header-idsdoes work if I remove the <!-- markdown-extras: header-ids --> and replace the processing function with markdown2.markdown(data, extras=["header-ids"]). So yeah, use-file-vars does basically nothing.
data = markdown2.markdown(data, extras=["header-ids"])
letsheader-ids
work in the outputdata
, in that HTML headers have their id attribute.data = markdown2.markdown(data, extras=["use-file-vars"])
while data starts with<!-- markdown-extras: header-ids -->
doesn't let header-ids work; headers are devoid of an id attribute.I dunno what's wrong here, I'm just saying what I've seen.
The text was updated successfully, but these errors were encountered: