public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How to change section dividers from div/section to li?
@ 2015-07-04  6:55 Diego Algorta
       [not found] ` <041499d2-158c-4dc9-b6d8-b5f8c0e0c3a0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Diego Algorta @ 2015-07-04  6:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Hi,

(in case the code examples don't render well, you can see the same 
here: https://gist.github.com/oboxodo/f514d3bfe894bc1c85bd)

I basically need to use ordered lists for sections instead of div or 
section.

Given this input:

```markdown

Independent paragraph.
 
# My heading 1
 
Para in heading 1.
 
## My heading 2
 
Para in heading 2
 
# Another heading 1
 
With its own para.
```

Running pandoc with `--section-divs -t html5` currently produces:

```html

<p>Independent paragraph.</p>
<section id="my-heading-1" class="level1">
  <h1>My heading 1</h1>
  <p>Para in heading 1.</p>
  <section id="my-heading-2" class="level2">
    <h2>My heading 2</h2>
    <p>Para in heading 2</p>
  </section>
</section>
<section id="another-heading-1" class="level1">
  <h1>Another heading 1</h1>
  <p>With its own para.</p>

</section>
```

Can you think of the best way to change that (maybe a filter?) so that I 
get this instead?:

```html

<p>Independent paragraph.</p>
<ol>
  <li id="my-heading-1" class="level1">
    <h1>My heading 1</h1>
    <p>Para in heading 1.</p>
    <ol>
      <li id="my-heading-2" class="level2">
        <h2>My heading 2</h2>
        <p>Para in heading 2</p>
      </li>
    </ol>
  </li>
  <li id="another-heading-1" class="level1">
    <h1>Another heading 1</h1>
    <p>With its own para.</p>
  </li>
</ol>

```

I'm gaining experience writing nodejs based filters, in case that helps. 
But this seems to be out of the scope of filters, am I right?

Thanks!
Diego

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/041499d2-158c-4dc9-b6d8-b5f8c0e0c3a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2015-07-06 18:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-04  6:55 How to change section dividers from div/section to li? Diego Algorta
     [not found] ` <041499d2-158c-4dc9-b6d8-b5f8c0e0c3a0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-04  7:01   ` Diego Algorta
2015-07-04  8:23   ` Pablo Rodríguez
     [not found]     ` <559797E8.6050100-S0/GAf8tV78@public.gmane.org>
2015-07-04 15:54       ` Diego Algorta
     [not found]         ` <d9d34f5d-570c-44ee-85fc-b3e15aa510cd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-04 16:36           ` Diego Algorta
     [not found]             ` <5be3cf89-2604-4a51-8cec-3175198fecc4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-04 17:44               ` Pablo Rodríguez
     [not found]                 ` <55981B70.4080409-S0/GAf8tV78@public.gmane.org>
2015-07-05  0:52                   ` Diego Algorta
2015-07-04 22:24   ` John MacFarlane
     [not found]     ` <20150704222450.GC11787-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-07-05  1:02       ` Diego Algorta
     [not found]         ` <CAPfjgvJxjrE0E5=u1saMH8NPvRWf9Rb4PURmeiKFQ+xx7Zqyrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-05  4:06           ` John MacFarlane
     [not found]             ` <20150705040611.GA12677-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-07-05 16:24               ` John MacFarlane
     [not found]                 ` <20150705162410.GA14096-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-07-05 16:37                   ` fiddlosopher
     [not found]                     ` <ffc909e4-ed88-4852-a6a4-26f9a6f5162a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-05 17:24                       ` fiddlosopher
     [not found]                         ` <ad4bf09c-2d32-44b7-9e69-f3d45c74ae54-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-06 18:23                           ` Diego Algorta

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