public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Convert Numbered Lists to Headings
@ 2021-02-06  2:29 Felix Wong
       [not found] ` <2bac3c98-9224-4f1e-bf70-a2e6a8b25a38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Wong @ 2021-02-06  2:29 UTC (permalink / raw)
  To: pandoc-discuss


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

Dear All,

I have numbered lists in a Word document, e.g.
1. Section 1
        A. Apple

   - apple is yummy
      - apple is red
      - apple is hard     
   
       B. Banana

2. Section 2
3. Section 3

How can I convert all numbered lists into Headings in md? e.g.

## Section 1
### Apple
* apple is yummy
* apple is red
* apple is hard 
### Banana
## Section 2   
## Section 3


Thank you all.

Best regards,
Felix 

-- 
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/2bac3c98-9224-4f1e-bf70-a2e6a8b25a38n%40googlegroups.com.

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

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

* Re: Convert Numbered Lists to Headings
       [not found] ` <2bac3c98-9224-4f1e-bf70-a2e6a8b25a38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-02-07 16:51   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2021-02-07 16:51 UTC (permalink / raw)
  To: Felix Wong, pandoc-discuss


That's a good job for a filter. See the documentation
on filters:

https://pandoc.org/filters.html

or Lua filters:

https://pandoc.org/lua-filters.html

Felix Wong <hi.felix.fw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Dear All,
>
> I have numbered lists in a Word document, e.g.
> 1. Section 1
>         A. Apple
>
>    - apple is yummy
>       - apple is red
>       - apple is hard     
>    
>        B. Banana
>
> 2. Section 2
> 3. Section 3
>
> How can I convert all numbered lists into Headings in md? e.g.
>
> ## Section 1
> ### Apple
> * apple is yummy
> * apple is red
> * apple is hard 
> ### Banana
> ## Section 2   
> ## Section 3
>
>
> Thank you all.
>
> Best regards,
> Felix 
>
> -- 
> 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/2bac3c98-9224-4f1e-bf70-a2e6a8b25a38n%40googlegroups.com.


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

end of thread, other threads:[~2021-02-07 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-06  2:29 Convert Numbered Lists to Headings Felix Wong
     [not found] ` <2bac3c98-9224-4f1e-bf70-a2e6a8b25a38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-02-07 16:51   ` 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).