Den mån 17 okt. 2022 17:56John MacFarlane skrev: > Seems like a bug to me. Can you open an issue at our GitHub tracker? > https://github.com/jgm/pandoc/issues https://github.com/jgm/pandoc/issues/8383 > > > On Oct 17, 2022, at 8:04 AM, BPJ wrote: > > > > 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

> >
    > >
  1. Li 1

  2. > >
  3. Li 2

    > >

    Li 2 para 2

  4. > >
  5. Li 3

  6. > >
> >

Text

> >
    > >
  1. Li i
  2. > >
  3. Li ii
  4. > >
> >
> >
> > `````` > > > > ``````mediawiki > >
> > > > > > == Head 2 == > > > >
> > > > > > === Head 3 === > > > >
    > >
  1. Li 1

  2. > >
  3. Li 2

    > >

    Li 2 para 2

  4. > >
  5. Li 3

> > > > Text > > > >
    > >
  1. Li i
  2. > >
  3. 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 > . > > -- > 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/926E2AED-D785-4763-8368-A35EAB35B6FC%40gmail.com > . > -- 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/CADAJKhBi-hS-pg0GC3truoB%3DxUGKJYU6LXCtXcSVmFrpk30uiw%40mail.gmail.com.