public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Simplified Markdown with no HTML tags
@ 2023-02-23  6:53 Brian Granger
       [not found] ` <b9374226-707d-4d6d-a860-f757d7b09ec6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Granger @ 2023-02-23  6:53 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi all,

I am working on a usage case where I want to generate simplified, clean 
Markdown without any explicit HTML tags or extended syntax such as the 
fenced divs syntax (:::::). I only need to preserve the basic content of 
the HMTL such as section headers, paragraphs, links, code blocks, etc. and 
don't need (or want) any of extra content that would be put into HTML tags. 
I have played with different Markdown format in Pandoc, filters, and 
existing extensions, but haven't been able to achieve this yet. Does anyone 
have any ideas or tips of things to try?

Thank you!

Cheers,

Brian

-- 
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/b9374226-707d-4d6d-a860-f757d7b09ec6n%40googlegroups.com.

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

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

* Re: Simplified Markdown with no HTML tags
       [not found] ` <b9374226-707d-4d6d-a860-f757d7b09ec6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-02-23  7:05   ` Brian Granger
       [not found]     ` <71a7bdeb-b8a7-461c-b70b-7452bb067f02n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Granger @ 2023-02-23  7:05 UTC (permalink / raw)
  To: pandoc-discuss


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

Looks like asking the question was enough for me to see it in a new light. 
My mistake was applying the extension to the output format rather than the 
input format. Thus, the following works:

pandoc -f html-native_divs-native_spans -t markdown

But this doesn't:

pandoc -f html -t markdown-native_divs-native_spans

I don't understand how to think about when to apply extension to the input 
versus the output format, but I do have a solution that enables me to move 
forward.

Cheers,

Brian



On Wednesday, February 22, 2023 at 10:53:22 PM UTC-8 Brian Granger wrote:

> Hi all,
>
> I am working on a usage case where I want to generate simplified, clean 
> Markdown without any explicit HTML tags or extended syntax such as the 
> fenced divs syntax (:::::). I only need to preserve the basic content of 
> the HMTL such as section headers, paragraphs, links, code blocks, etc. and 
> don't need (or want) any of extra content that would be put into HTML tags. 
> I have played with different Markdown format in Pandoc, filters, and 
> existing extensions, but haven't been able to achieve this yet. Does anyone 
> have any ideas or tips of things to try?
>
> Thank you!
>
> Cheers,
>
> Brian
>

-- 
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/71a7bdeb-b8a7-461c-b70b-7452bb067f02n%40googlegroups.com.

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

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

* Re: Simplified Markdown with no HTML tags
       [not found]     ` <71a7bdeb-b8a7-461c-b70b-7452bb067f02n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-02-23 14:47       ` Julien Dutant
  0 siblings, 0 replies; 3+ messages in thread
From: Julien Dutant @ 2023-02-23 14:47 UTC (permalink / raw)
  To: pandoc-discuss


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

One way to think about it: it's not about input / output but about format. 
HTML has <div> and <span> in its definition, that's not optional; Pandoc's 
internal representation (AST) has Div and Span elements, that's not 
optional. But whether markdown includes Div / Span syntax ('native_divs' 
and 'native_spans') is optional, hence the option is on the markdown 
format, not on the html format. 

For example if you were writing *to* markdown you could remove Div and 
Spans with pandoc  -t markdown-native_divs-native_spans

J

On Thursday, February 23, 2023 at 7:05:36 AM UTC Brian Granger wrote:

> Looks like asking the question was enough for me to see it in a new light. 
> My mistake was applying the extension to the output format rather than the 
> input format. Thus, the following works:
>
> pandoc -f html-native_divs-native_spans -t markdown
>
> But this doesn't:
>
> pandoc -f html -t markdown-native_divs-native_spans
>
> I don't understand how to think about when to apply extension to the input 
> versus the output format, but I do have a solution that enables me to move 
> forward.
>
> Cheers,
>
> Brian
>
>
>
> On Wednesday, February 22, 2023 at 10:53:22 PM UTC-8 Brian Granger wrote:
>
>> Hi all,
>>
>> I am working on a usage case where I want to generate simplified, clean 
>> Markdown without any explicit HTML tags or extended syntax such as the 
>> fenced divs syntax (:::::). I only need to preserve the basic content of 
>> the HMTL such as section headers, paragraphs, links, code blocks, etc. and 
>> don't need (or want) any of extra content that would be put into HTML tags. 
>> I have played with different Markdown format in Pandoc, filters, and 
>> existing extensions, but haven't been able to achieve this yet. Does anyone 
>> have any ideas or tips of things to try?
>>
>> Thank you!
>>
>> Cheers,
>>
>> Brian
>>
>

-- 
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/7bc05dcb-7a1a-49fd-9467-dbec7a135720n%40googlegroups.com.

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

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

end of thread, other threads:[~2023-02-23 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23  6:53 Simplified Markdown with no HTML tags Brian Granger
     [not found] ` <b9374226-707d-4d6d-a860-f757d7b09ec6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-02-23  7:05   ` Brian Granger
     [not found]     ` <71a7bdeb-b8a7-461c-b70b-7452bb067f02n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-02-23 14:47       ` Julien Dutant

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