public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* List of recognized file extensions
@ 2020-12-27 19:21 Zev Spitz
       [not found] ` <7694e23e-1034-4c4e-a0a7-7c6ac9fe2f5dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Zev Spitz @ 2020-12-27 19:21 UTC (permalink / raw)
  To: pandoc-discuss


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

The Pandoc user's guide states: " If no input file is specified (so that 
input comes from *stdin*), or if the input files’ extensions are unknown, 
the input format will be assumed to be Markdown." 
(https://pandoc.org/MANUAL.html#specifying-formats)

Where can I find out which extensions are recognized by Pandoc?

Per 
https://groups.google.com/g/pandoc-discuss/c/gQRR9qat9Zw/m/_S1jzJoWBAAJ, I 
am trying to test my Pandoc filter framework 
(https://github.com/zspitz/PandocFilters) against the test files in the 
Pandoc repo (https://github.com/jgm/pandoc/tree/master/test) and I am 
getting a lot of "Unknown input format" or "Cannot deduce file format" 
errors. I'm assuming either

1. some of the files in that folder are not used as inputs, or
2. there's some additional logic for determining the input format used by 
the tests.

I am currently skipping all inputs for which I can't get valid JSON, but 
I'd prefer to either resolve the input format somehow, or remove them from 
testing.

-- 
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/7694e23e-1034-4c4e-a0a7-7c6ac9fe2f5dn%40googlegroups.com.

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

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

* Re: List of recognized file extensions
       [not found] ` <7694e23e-1034-4c4e-a0a7-7c6ac9fe2f5dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-12-27 19:42   ` Gwern Branwen
       [not found]     ` <CAMwO0gxTVqK8snkFUU3c+11h8ofo1SGbdsRRZ=8dqzfgqX=uQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Gwern Branwen @ 2020-12-27 19:42 UTC (permalink / raw)
  To: pandoc-discuss

If you grep the Pandoc repo for extensions like '.markdown' which one
can safely assume Pandoc would recognize & must encode somewhere as a
literal extension match, Text.Pandoc.App.FormatHeuristics pops up as a
relevant looking hit:
https://github.com/jgm/pandoc/blob/47f435276a62b3eddac496de6a7e365631d57197/src/Text/Pandoc/App/FormatHeuristics.hs#L33

-- 
gwern
https://www.gwern.net


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

* Re: List of recognized file extensions
       [not found]     ` <CAMwO0gxTVqK8snkFUU3c+11h8ofo1SGbdsRRZ=8dqzfgqX=uQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-01-04 11:38       ` Zev Spitz
  0 siblings, 0 replies; 3+ messages in thread
From: Zev Spitz @ 2021-01-04 11:38 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks, that was really helpful, and I've implemented extension-specific 
handling 
<https://github.com/zspitz/PandocFilters/blob/main/Tests/TestContainer.cs#L19> 
into my tests.
On Sunday, December 27, 2020 at 9:42:56 PM UTC+2 Gwern Branwen wrote:

> If you grep the Pandoc repo for extensions like '.markdown' which one
> can safely assume Pandoc would recognize & must encode somewhere as a
> literal extension match, Text.Pandoc.App.FormatHeuristics pops up as a
> relevant looking hit:
>
> https://github.com/jgm/pandoc/blob/47f435276a62b3eddac496de6a7e365631d57197/src/Text/Pandoc/App/FormatHeuristics.hs#L33
>
> -- 
> gwern
> https://www.gwern.net
>

-- 
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/96021418-eb83-48b6-9430-8a13cede92d5n%40googlegroups.com.

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

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

end of thread, other threads:[~2021-01-04 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-27 19:21 List of recognized file extensions Zev Spitz
     [not found] ` <7694e23e-1034-4c4e-a0a7-7c6ac9fe2f5dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-27 19:42   ` Gwern Branwen
     [not found]     ` <CAMwO0gxTVqK8snkFUU3c+11h8ofo1SGbdsRRZ=8dqzfgqX=uQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-01-04 11:38       ` Zev Spitz

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