When converting to mediawiki MW headings are prepended with a span
``, evidently to provide an anchor to
pandoc's original/automatic id so that internal links will still work.
However
if there is a `` element[^1] I frequently end up with an identical
id
tag on the div resulting from the section element and the automatically
inserted span element, which seems like a bug to me:
``````html
Head 2
Head 3
Li 1
Li 2
Li 2 para 2
Li 3
Text
- Li i
- Li ii
``````
``````mediawiki
== Head 2 ==
=== Head 3 ===
Li 1
Li 2
Li 2 para 2
Li 3
Text
- Li i
- Li ii
``````
It seems that the only fix currently is to go through the MW source after
conversion and manually remove any offending spans.
I wish the mediawiki writer were smart enough to not insert the span above
the
heading if its id would be identical to that of a parent section div. Would
that
be possible, and is this enough of a bug to submit an issue?
In the actual use case I modify the HTML input with an HTML editing
script/library before conversion to mediawiki, and as a part of that I add
attributes to the section elements which I want to be there on the div in
the MW output, so removin
[^1]: In my case inserted by pandoc into the HTML now used as source at an
earlier run.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAJARL1rpi2k-j-1jZLTGoEFnmhfybH9-F6W-_SaYrXNQ%40mail.gmail.com.