public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Markdown to Markdown: Prevent appending backslashes in the document
@ 2018-12-26 16:28 Nikhil Agarwal
       [not found] ` <d1878c5c-c87a-4caf-985c-9f748fd0adfb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Nikhil Agarwal @ 2018-12-26 16:28 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 881 bytes --]

Hi, I am using Pandoc to clean up my markdown files, i.e. I am exporting 
from Markdown and to Markdown. In this process, Pandoc adds a lot of `\` 
the backslash character before special characters. Is it possible (maybe 
with an extension) to prevent Pandoc from adding the additional backslash 
characters?

-- 
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/d1878c5c-c87a-4caf-985c-9f748fd0adfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1289 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Markdown to Markdown: Prevent appending backslashes in the document
       [not found] ` <d1878c5c-c87a-4caf-985c-9f748fd0adfb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-12-26 21:32   ` John MacFarlane
       [not found]     ` <m2a7ks9dpi.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2018-12-26 21:32 UTC (permalink / raw)
  To: Nikhil Agarwal, pandoc-discuss


Pandoc is pretty conservative about escaping
characters that might be interpreted as formatting.
You can reduce this a bit by turning off some of
the extensions (since this reduces the number
of characters that might be special characters).
But only a bit.

Nikhil Agarwal <explore.na-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi, I am using Pandoc to clean up my markdown files, i.e. I am exporting 
> from Markdown and to Markdown. In this process, Pandoc adds a lot of `\` 
> the backslash character before special characters. Is it possible (maybe 
> with an extension) to prevent Pandoc from adding the additional backslash 
> characters?
>
> -- 
> 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/d1878c5c-c87a-4caf-985c-9f748fd0adfb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Markdown to Markdown: Prevent appending backslashes in the document
       [not found]     ` <m2a7ks9dpi.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-01-04  0:33       ` Nikhil Agarwal
  0 siblings, 0 replies; 3+ messages in thread
From: Nikhil Agarwal @ 2019-01-04  0:33 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2481 bytes --]

Is it possible to create some extension that analyzes the new backslashes 
that got added and remove those? By doing `diff` we are able to identify 
the added `\` but can we automate this? 

The algorithm could be that we analyze every pair of characters 
sequentially from the old file and check if the corresponding 2 characters 
if present in the new file, contain a backslash between them. If so, the 
backslash should be deleted. The only issue is how to find the 
corresponding characters in the new file.  

On Wednesday, 26 December 2018 22:32:29 UTC+1, John MacFarlane wrote:
>
>
> Pandoc is pretty conservative about escaping 
> characters that might be interpreted as formatting. 
> You can reduce this a bit by turning off some of 
> the extensions (since this reduces the number 
> of characters that might be special characters). 
> But only a bit. 
>
> Nikhil Agarwal <explo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: 
>
> > Hi, I am using Pandoc to clean up my markdown files, i.e. I am exporting 
> > from Markdown and to Markdown. In this process, Pandoc adds a lot of `\` 
> > the backslash character before special characters. Is it possible (maybe 
> > with an extension) to prevent Pandoc from adding the additional 
> backslash 
> > characters? 
> > 
> > -- 
> > 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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/d1878c5c-c87a-4caf-985c-9f748fd0adfb%40googlegroups.com. 
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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/71eb1b76-f0d4-4519-aa2a-d9b8b929eedc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 4400 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-04  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-26 16:28 Markdown to Markdown: Prevent appending backslashes in the document Nikhil Agarwal
     [not found] ` <d1878c5c-c87a-4caf-985c-9f748fd0adfb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-12-26 21:32   ` John MacFarlane
     [not found]     ` <m2a7ks9dpi.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-01-04  0:33       ` Nikhil Agarwal

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).