One way to think about it: it's not about input / output but about format. HTML has
and in its definition, that's not optional; Pandoc's internal representation (AST) has Div and Span elements, that's not optional. But whether markdown includes Div / Span syntax ('native_divs' and 'native_spans') is optional, hence the option is on the markdown format, not on the html format. For example if you were writing *to* markdown you could remove Div and Spans with pandoc -t markdown-native_divs-native_spans J On Thursday, February 23, 2023 at 7:05:36 AM UTC Brian Granger wrote: > Looks like asking the question was enough for me to see it in a new light. > My mistake was applying the extension to the output format rather than the > input format. Thus, the following works: > > pandoc -f html-native_divs-native_spans -t markdown > > But this doesn't: > > pandoc -f html -t markdown-native_divs-native_spans > > I don't understand how to think about when to apply extension to the input > versus the output format, but I do have a solution that enables me to move > forward. > > Cheers, > > Brian > > > > On Wednesday, February 22, 2023 at 10:53:22 PM UTC-8 Brian Granger wrote: > >> Hi all, >> >> I am working on a usage case where I want to generate simplified, clean >> Markdown without any explicit HTML tags or extended syntax such as the >> fenced divs syntax (:::::). I only need to preserve the basic content of >> the HMTL such as section headers, paragraphs, links, code blocks, etc. and >> don't need (or want) any of extra content that would be put into HTML tags. >> I have played with different Markdown format in Pandoc, filters, and >> existing extensions, but haven't been able to achieve this yet. Does anyone >> have any ideas or tips of things to try? >> >> Thank you! >> >> Cheers, >> >> Brian >> > -- 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/7bc05dcb-7a1a-49fd-9467-dbec7a135720n%40googlegroups.com.