Thanks! filtering is a good idea and very likely the best approach in such cases. Mine was a rather borderline example, sorry - it was the best I could think of (based on a known limitation of markdown), I was mostly interested in the "general" question. BTW, I did some further testing, so just for reference (should someone google this in the future): to the best of my understanding "native" raw attributes are not actually "inserted" in the native AST (in the way, say, that html raw attributes are inserted into html) but left embedded in it as RawInline/RawBlock in the same way any other raw attribute is, for example: `````markdown `foo`{=native} `bar`{=html} `baz`{=foobar} ````` gets converted to `````native [Para [RawInline (Format "native") "foo",SoftBreak,RawInline (Format "html") "bar",SoftBreak,RawInline (Format "foobar") "baz"]] ````` (i.e. the native writer behaves in the same way no matter what the Format value is -- including nonexistent Format "foobar") I think this is a very reasonable limitation, but in any case the current behavior can still be quite handy, since (as suggested by BP) it should be easy to filter the resulting RawInline (Format "native") elements (or, for example, Format "myproject"). On Wednesday, August 4, 2021 at 5:11:07 PM UTC+2 BP wrote: > You can use raw HTML, or just a code span with some content which does not > otherwise occur in your code spans and replace that with a LineBreak > element with a filter. > > ``````markdown > ## First line.`LB`Second line. > `````` > > ``````lua > function Code (elem) > if 'LB' == elem.text then > return pandoc.LineBreak() > end > return nil > end > `````` > > HTH, > > /bpj > > > Den ons 4 aug. 2021 16:16Alessandro G. skrev: > >> Hello, I am a new user. I apologize in advance should my question have >> already been covered (I did try searching) -- or make no sense! :) >> >> Is it possible to use a raw attribute (raw_attribute extension) to >> express Pandoc's native format fragments? If yes, how? >> >> As an example, Pandoc's native format allows this: >> [Header 1 ("",[],[]) [Str "foo",LineBreak,Str "bar"]] >> (note there is a "LineBreak" inside "Header") >> for reference, this converts (as intended) to HTML as

foo
> />bar

>> >> As far as I understand, it is not possible to express "LineBreak" inside >> "Header" via (simple) markdown (I might be wrong!), so I thought about >> raw_attribute. >> >> So far I tried using variations (with/without commas) of >> # foo`LineBreak`{=native}bar >> but it did not work. >> >> Thanks in advance! :) >> >> -- >> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/2d57c016-1442-4793-9e30-efceb8668938n%40googlegroups.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/ca0ade0a-9d26-45e3-8976-af93c3e3c09en%40googlegroups.com.