public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Julien Dutant <julien.dutant-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Simplified Markdown with no HTML tags
Date: Thu, 23 Feb 2023 06:47:00 -0800 (PST)	[thread overview]
Message-ID: <7bc05dcb-7a1a-49fd-9467-dbec7a135720n@googlegroups.com> (raw)
In-Reply-To: <71a7bdeb-b8a7-461c-b70b-7452bb067f02n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


[-- 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 --]

      parent reply	other threads:[~2023-02-23 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  6:53 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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7bc05dcb-7a1a-49fd-9467-dbec7a135720n@googlegroups.com \
    --to=julien.dutant-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).