If there's ever such a reader, I hope there will be the option of having all the text in a single string in a `Para/Str`, without any other elements like `Space` or `Softbreak`. This would be a "pure" plain text reader, or a "Null" reader.

Since the subject has reappeared, I'll repeat a few things I've said in issue #6393.

* Could be useful for preprocessing with the embedded Lua, and then read back in the AST with `pandoc.read` (or just return as Plain Text).

* This could offer a way to introduce a "custom (lua) reader", just as we have a "custom (lua) writer". (Not trivial to create a parser once read, but the symmetry is pleasing :) )

* I vaguely remember tarleb/AK wishing eventually to have `pandoc` behave like `lualatex`, in having a way to use the embedded Lua purely as is (heavily paraphrasing, must find source); this wouldn't exactly fit the bill, but still have some of its attributes, as in:

text -> [Null reader] -> [Lua filter, return single Para/Str] -> [Plain writer] -> modified text

* As mb21 suggested, there could be an option to break into `Para`s on newlines or double newlines, but that can be done from within a lua filter.

Anyway, this isn't essential, and can be simulated as already noted:

- As I said in #6393, this can be simulated by bracketing with html comments, but the text must not have html comments itself.

- As you said in #2705 (which I didn't know about when commenting in #6393), this can also be simulated by bracketing with code block fences; but one must take care these fences are longer than any other fences in the text (and the solution is to just bracket the text between very long fences that one wouldn't use in any text).

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/33e61065-ecf7-413c-a6fc-871cd4a1e431n%40googlegroups.com.