public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Removing <span dir="ltr"> from generated Markdown files
@ 2020-06-09 22:28 Russ Urquhart
       [not found] ` <abf1f9d9-d419-439a-a997-13714d2b2b36o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Russ Urquhart @ 2020-06-09 22:28 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,

I am saving Google doc files to .docx and converting them to GitHub 
flavored Markdown with the following command:

pandoc --extract-media ./images file,docx -t gfm  -o doc1.md


I keep getting the <span dir="ltr"> tags through out the generated 
document. Is there some way to stop these from being inserted in the 
generated Markdown?


Thanks,


Russ

-- 
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/abf1f9d9-d419-439a-a997-13714d2b2b36o%40googlegroups.com.

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

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

* Re: Removing <span dir="ltr"> from generated Markdown files
       [not found] ` <abf1f9d9-d419-439a-a997-13714d2b2b36o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-06-10 10:35   ` BPJ
       [not found]     ` <CADAJKhAK1K_Npq=OvLayCZWbdBwqjvBs3WtWfhPe0wL4U99wkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2020-06-10 19:01   ` John MacFarlane
  1 sibling, 1 reply; 4+ messages in thread
From: BPJ @ 2020-06-10 10:35 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]

See earlier discussion, with rough-and-ready filter which simply replaces
those spans with their content: https://v.gd/1g1Ych

-- 
Better --help|less than helpless

Den ons 10 juni 2020 00:29Russ Urquhart <rurquhart-Zl5T1cyB3pc@public.gmane.org> skrev:

> Hi,
>
> I am saving Google doc files to .docx and converting them to GitHub
> flavored Markdown with the following command:
>
> pandoc --extract-media ./images file,docx -t gfm  -o doc1.md
>
>
> I keep getting the <span dir="ltr"> tags through out the generated
> document. Is there some way to stop these from being inserted in the
> generated Markdown?
>
>
> Thanks,
>
>
> Russ
>
> --
> 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/abf1f9d9-d419-439a-a997-13714d2b2b36o%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/abf1f9d9-d419-439a-a997-13714d2b2b36o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhAK1K_Npq%3DOvLayCZWbdBwqjvBs3WtWfhPe0wL4U99wkw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3252 bytes --]

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

* Re: Removing <span dir="ltr"> from generated Markdown files
       [not found]     ` <CADAJKhAK1K_Npq=OvLayCZWbdBwqjvBs3WtWfhPe0wL4U99wkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-06-10 11:03       ` BPJ
  0 siblings, 0 replies; 4+ messages in thread
From: BPJ @ 2020-06-10 11:03 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]

I just looked at that filter, and it actually does three things:

1. Removes any `dir` attribute.
2. Removes any `custom-style` attribute.
3. Replaces a span or div with its content if it doesn't have any remaining
attributes.

You may want to omit 2 if you run with the `+styles` extension.


-- 
Better --help|less than helpless

Den ons 10 juni 2020 12:35BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> See earlier discussion, with rough-and-ready filter which simply replaces
> those spans with their content: https://v.gd/1g1Ych
>
> --
> Better --help|less than helpless
>
> Den ons 10 juni 2020 00:29Russ Urquhart <rurquhart-Zl5T1cyB3pc@public.gmane.org> skrev:
>
>> Hi,
>>
>> I am saving Google doc files to .docx and converting them to GitHub
>> flavored Markdown with the following command:
>>
>> pandoc --extract-media ./images file,docx -t gfm  -o doc1.md
>>
>>
>> I keep getting the <span dir="ltr"> tags through out the generated
>> document. Is there some way to stop these from being inserted in the
>> generated Markdown?
>>
>>
>> Thanks,
>>
>>
>> Russ
>>
>> --
>> 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/abf1f9d9-d419-439a-a997-13714d2b2b36o%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/abf1f9d9-d419-439a-a997-13714d2b2b36o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/CADAJKhAsNTR47OqZLEWKUfJcusix1Cr5_yOrR2DJt5z%3DOjeXsA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4218 bytes --]

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

* Re: Removing <span dir="ltr"> from generated Markdown files
       [not found] ` <abf1f9d9-d419-439a-a997-13714d2b2b36o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-06-10 10:35   ` BPJ
@ 2020-06-10 19:01   ` John MacFarlane
  1 sibling, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2020-06-10 19:01 UTC (permalink / raw)
  To: Russ Urquhart, pandoc-discuss


If you're using an older version of pandoc, I suggest upgrading.
We did something in more recent versions to suppress
ltr tags when they are not necessary.

Russ Urquhart <rurquhart-Zl5T1cyB3pc@public.gmane.org> writes:

> Hi,
>
> I am saving Google doc files to .docx and converting them to GitHub 
> flavored Markdown with the following command:
>
> pandoc --extract-media ./images file,docx -t gfm  -o doc1.md
>
>
> I keep getting the <span dir="ltr"> tags through out the generated 
> document. Is there some way to stop these from being inserted in the 
> generated Markdown?
>
>
> Thanks,
>
>
> Russ
>
> -- 
> 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/abf1f9d9-d419-439a-a997-13714d2b2b36o%40googlegroups.com.


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

end of thread, other threads:[~2020-06-10 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 22:28 Removing <span dir="ltr"> from generated Markdown files Russ Urquhart
     [not found] ` <abf1f9d9-d419-439a-a997-13714d2b2b36o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-06-10 10:35   ` BPJ
     [not found]     ` <CADAJKhAK1K_Npq=OvLayCZWbdBwqjvBs3WtWfhPe0wL4U99wkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-06-10 11:03       ` BPJ
2020-06-10 19:01   ` 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).