* Output of markdown to markdown is not equal to the input
@ 2019-07-14 14:50 Christopher Dignam
[not found] ` <81dd41b1-f306-48e1-ae4d-7d7f8892d933-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Dignam @ 2019-07-14 14:50 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1255 bytes --]
I'm looking to use Pandoc to strip comments from a Markdown document, but
it looks like Pandoc strips information when I run the following command:
pandoc example.md --strip-comments -o example-rendered.md
example.md
<!--
- some example comment
- mention related issues (Github, Trello, etc.)
- with nesting and other stuffreviewers when you're ready
+ "Use your gut" to choose appropriate reviewers
+ expect your first response within 24 hours
-->
some arrow -->
[0]: https://example.com
example-rendered.md
some arrow --\>
This is what I expected the output to be
some arrow -->
[0]: https://example.com
Is there a way to make pandoc preserve the document?
--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/81dd41b1-f306-48e1-ae4d-7d7f8892d933%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 5138 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Output of markdown to markdown is not equal to the input
[not found] ` <81dd41b1-f306-48e1-ae4d-7d7f8892d933-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-07-14 15:59 ` John MacFarlane
0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2019-07-14 15:59 UTC (permalink / raw)
To: Christopher Dignam, pandoc-discuss
This is just a difference in escaping. There isn't a semantic
difference between --> and --\>.
Pandoc adds the backslash escape because the --> is not part
of an HTML comment, and the escape ensures that it won't be
parsed as one.
Generally you should not expect that markdown -> markdown gives
identity. Lots will change: bullet list markers, indentation,
escaping. The semantics should stay the same, though.
Christopher Dignam <chdignam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> I'm looking to use Pandoc to strip comments from a Markdown document, but
> it looks like Pandoc strips information when I run the following command:
>
> pandoc example.md --strip-comments -o example-rendered.md
>
>
>
> example.md
> <!--
> - some example comment
> - mention related issues (Github, Trello, etc.)
> - with nesting and other stuffreviewers when you're ready
> + "Use your gut" to choose appropriate reviewers
> + expect your first response within 24 hours
> -->
>
> some arrow -->
>
> [0]: https://example.com
>
>
>
> example-rendered.md
> some arrow --\>
>
>
>
> This is what I expected the output to be
> some arrow -->
>
> [0]: https://example.com
>
>
>
>
> Is there a way to make pandoc preserve the document?
>
> --
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/81dd41b1-f306-48e1-ae4d-7d7f8892d933%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-14 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-14 14:50 Output of markdown to markdown is not equal to the input Christopher Dignam
[not found] ` <81dd41b1-f306-48e1-ae4d-7d7f8892d933-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-14 15:59 ` John MacFarlane
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).