markdownpandocmultimarkdown

markdown pandoc creating a span with an id


if I wanted to set an id on a span element or a list element in pandoc markdown (or multimarkdown) is there anyway to do it other than

<span id="stuff"> my text </span> or to write out the list by hand?

Thanks


Solution

  • Span elements - no, pandoc doesn't support arbitary spans (there has been some discussion on the mailing list regarding options to implement custom spans, but the general consensus was no as I recall).

    List items - again no, but you could potentially script a filter to do this - The pandoc documention has an example on adding an id* to links here, although you do need to code for every target language you are going to use

    *in this case it uses the id to treat stuff as ruby, but there is nothing to stop you just sticking the id into the output as you need.