public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* markdown_attribute
@ 2014-06-27  6:54 Jan Ulrich Hasecke
       [not found] ` <53AD1531.3020801-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Ulrich Hasecke @ 2014-06-27  6:54 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi,

I want to understand this snippet in the documentation:

"""
markdown_attribute

By default, pandoc interprets material inside block-level tags as
markdown. This extension changes the behavior so that markdown is only
parsed inside block-level tags if the tags have the attribute markdown=1.
"""

When I use it like this:

pandoc -f markdown+markdown_attribute test.md -s -o test.html

Markdown in a table-tag is not interpreted. Fine.

But where can I set the attribute markdown=1 to have it interpreted?

This does not work:

<table markdown=1>
   <tr>
      <td>*Geranien*</td>
      <td>[Tulpen](http://www.example.com)</td>
   </tr>
</table>

TIA
juh

-- 
Software-Dokumentation mit Sphinx
http://www.amazon.de/dp/1497448689/
Paperback: 224 Seiten


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

* Re: markdown_attribute
       [not found] ` <53AD1531.3020801-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
@ 2014-06-27 13:25   ` Jesse Rosenthal
       [not found]     ` <87vbrmmqlt.fsf-4GNroTWusrE@public.gmane.org>
  2014-06-27 17:19   ` markdown_attribute John MacFarlane
  1 sibling, 1 reply; 10+ messages in thread
From: Jesse Rosenthal @ 2014-06-27 13:25 UTC (permalink / raw)
  To: Jan Ulrich Hasecke, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Those extensions, I believe, are markdown syntax extensions---so they
wouldn't work reading html.


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

* Re: markdown_attribute
       [not found]     ` <87vbrmmqlt.fsf-4GNroTWusrE@public.gmane.org>
@ 2014-06-27 17:18       ` Jan Ulrich Hasecke
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Ulrich Hasecke @ 2014-06-27 17:18 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi Jesse,

Am 27.06.2014 15:25, schrieb Jesse Rosenthal:
> Those extensions, I believe, are markdown syntax extensions---so they
> wouldn't work reading html.

Maybe you're right. Obviously I don't understand the documentation. So
what would be a typical use case?

juh



-- 
Software-Dokumentation mit Sphinx
http://www.amazon.de/dp/1497448689/
Paperback: 224 Seiten


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

* Re: markdown_attribute
       [not found] ` <53AD1531.3020801-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
  2014-06-27 13:25   ` markdown_attribute Jesse Rosenthal
@ 2014-06-27 17:19   ` John MacFarlane
       [not found]     ` <20140627171930.GB20448-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2014-06-27 17:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Jan Ulrich Hasecke [Jun 27 14 08:54 ]:
>Hi,
>
>I want to understand this snippet in the documentation:
>
>"""
>markdown_attribute
>
>By default, pandoc interprets material inside block-level tags as
>markdown. This extension changes the behavior so that markdown is only
>parsed inside block-level tags if the tags have the attribute markdown=1.
>"""
>
>When I use it like this:
>
>pandoc -f markdown+markdown_attribute test.md -s -o test.html
>
>Markdown in a table-tag is not interpreted. Fine.
>
>But where can I set the attribute markdown=1 to have it interpreted?
>
>This does not work:
>
><table markdown=1>
>   <tr>
>      <td>*Geranien*</td>
>      <td>[Tulpen](http://www.example.com)</td>
>   </tr>
></table>

You need to set the attribute on the block-level tag containing
the markdown.  Here's that's the td tags.


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

* Re: markdown_attribute
       [not found]     ` <20140627171930.GB20448-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-06-27 17:31       ` Jan Ulrich Hasecke
       [not found]         ` <53ADAA67.5090801-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Ulrich Hasecke @ 2014-06-27 17:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw



Am 27.06.2014 19:19, schrieb John MacFarlane:
> You need to set the attribute on the block-level tag containing
> the markdown.  Here's that's the td tags.

I tried that, but without success.

<table>
    <tr>
         <td markdown=1>*Geranien*</td>
         <td markdown="1">[Tulpen](http://www.example.com)</td>
    </tr>
</table>

With quotes without quotes, nothing.

I am using
pandoc 1.12.4.2


juh


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

* Re: markdown_attribute
       [not found]         ` <53ADAA67.5090801-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
@ 2014-06-27 18:04           ` John MacFarlane
       [not found]             ` <20140627180400.GB29268-0VdLhd/A9Pm0ooXD8Eul3cvGpKv5k03bTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2014-06-27 18:04 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Try putting the attribute on the tr and table as well.
I believe the way it works is this:  if you hit a block-level tag
without the attribute, then the whole contents of the tag are parsed
as HTML.  (That includes any interior tags, whether or not they have
markdown=1.)

+++ Jan Ulrich Hasecke [Jun 27 14 19:31 ]:
>
>
>Am 27.06.2014 19:19, schrieb John MacFarlane:
>> You need to set the attribute on the block-level tag containing
>> the markdown.  Here's that's the td tags.
>
>I tried that, but without success.
>
><table>
>    <tr>
>         <td markdown=1>*Geranien*</td>
>         <td markdown="1">[Tulpen](http://www.example.com)</td>
>    </tr>
></table>
>
>With quotes without quotes, nothing.
>
>I am using
>pandoc 1.12.4.2
>
>
>juh
>
>-- 
>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/53ADAA67.5090801%40mailbox.org.
>For more options, visit https://groups.google.com/d/optout.


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

* Re: markdown_attribute
       [not found]             ` <20140627180400.GB29268-0VdLhd/A9Pm0ooXD8Eul3cvGpKv5k03bTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-06-27 18:08               ` Jan Ulrich Hasecke
  2014-06-27 22:26               ` markdown_attribute BP Jonsson
  1 sibling, 0 replies; 10+ messages in thread
From: Jan Ulrich Hasecke @ 2014-06-27 18:08 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw



Am 27.06.2014 20:04, schrieb John MacFarlane:
> Try putting the attribute on the tr and table as well.
> I believe the way it works is this:  if you hit a block-level tag
> without the attribute, then the whole contents of the tag are parsed
> as HTML.  (That includes any interior tags, whether or not they have
> markdown=1.)

Ah, polluting every tag with markdown=1 did the job.

Thanks!
juh

-- 
Software-Dokumentation mit Sphinx
http://www.amazon.de/dp/1497448689/
Paperback: 224 Seiten


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

* Re: markdown_attribute
       [not found]             ` <20140627180400.GB29268-0VdLhd/A9Pm0ooXD8Eul3cvGpKv5k03bTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  2014-06-27 18:08               ` markdown_attribute Jan Ulrich Hasecke
@ 2014-06-27 22:26               ` BP Jonsson
       [not found]                 ` <53ADEF82.3000809-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: BP Jonsson @ 2014-06-27 22:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

2014-06-27 20:04, John MacFarlane skrev:
> Try putting the attribute on the tr and table as well.
> I believe the way it works is this:  if you hit a block-level tag
> without the attribute, then the whole contents of the tag are parsed
> as HTML.  (That includes any interior tags, whether or not they have
> markdown=1.)

That's rather counter-intuitive. I would also have expected that
everything below a block level tag with markdown=1 would
'inherit' the positive value. Why not make it so and then make
markdown=0 significant so that one can turn the feature off
further down? I guess you could keep a stack with values for
'markdownness' at the different nesting levels (as in the
comments below).

    <table markdown=1>                                  <!-- [1] -->
        <tr>                                            <!-- [1, 1] -->
            <td>*This* is markdown</td>                 <!-- [1, 1, 1] -->
            <td markdown=0>This is *not* markdown</td>  <!-- [1, 1, 0] -->
        </tr>
    </table>

/bpj

> 
> +++ Jan Ulrich Hasecke [Jun 27 14 19:31 ]:
>>
>>
>> Am 27.06.2014 19:19, schrieb John MacFarlane:
>>> You need to set the attribute on the block-level tag containing
>>> the markdown.  Here's that's the td tags.
>>
>> I tried that, but without success.
>>
>> <table>
>>    <tr>
>>         <td markdown=1>*Geranien*</td>
>>         <td markdown="1">[Tulpen](http://www.example.com)</td>
>>    </tr>
>> </table>
>>
>> With quotes without quotes, nothing.
>>
>> I am using
>> pandoc 1.12.4.2
>>
>>
>> juh
>>
>> -- 
>> 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/53ADAA67.5090801%40mailbox.org. 
>>
>> For more options, visit https://groups.google.com/d/optout.
> 


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

* Re: markdown_attribute
       [not found]                 ` <53ADEF82.3000809-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-06-27 23:27                   ` John MacFarlane
       [not found]                     ` <20140627232757.GD29984-0VdLhd/A9Pm0ooXD8Eul3cvGpKv5k03bTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2014-06-27 23:27 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ BP Jonsson [Jun 28 14 00:26 ]:
>2014-06-27 20:04, John MacFarlane skrev:
>> Try putting the attribute on the tr and table as well.
>> I believe the way it works is this:  if you hit a block-level tag
>> without the attribute, then the whole contents of the tag are parsed
>> as HTML.  (That includes any interior tags, whether or not they have
>> markdown=1.)
>
>That's rather counter-intuitive. I would also have expected that
>everything below a block level tag with markdown=1 would
>'inherit' the positive value. Why not make it so and then make
>markdown=0 significant so that one can turn the feature off
>further down? I guess you could keep a stack with values for
>'markdownness' at the different nesting levels (as in the
>comments below).
>
>    <table markdown=1>                                  <!-- [1] -->
>        <tr>                                            <!-- [1, 1] -->
>            <td>*This* is markdown</td>                 <!-- [1, 1, 1] -->
>            <td markdown=0>This is *not* markdown</td>  <!-- [1, 1, 0] -->
>        </tr>
>    </table>

Well, it turns out this IS the way it works in PHP Markdown Extra
and multimarkdown.  And since the point of the extension is to
allow conversion between these formats, I should do it this way,
too.

It would be helpful if someone could put an issue up on the tracker
so I don't forget.


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

* Re: markdown_attribute
       [not found]                     ` <20140627232757.GD29984-0VdLhd/A9Pm0ooXD8Eul3cvGpKv5k03bTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-06-28 15:01                       ` BP Jonsson
  0 siblings, 0 replies; 10+ messages in thread
From: BP Jonsson @ 2014-06-28 15:01 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

2014-06-28 01:27, John MacFarlane skrev:
>
> It would be helpful if someone could put an issue up on the tracker
> so I don't forget.


Done as issue #1378

/bpj


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

end of thread, other threads:[~2014-06-28 15:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-27  6:54 markdown_attribute Jan Ulrich Hasecke
     [not found] ` <53AD1531.3020801-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2014-06-27 13:25   ` markdown_attribute Jesse Rosenthal
     [not found]     ` <87vbrmmqlt.fsf-4GNroTWusrE@public.gmane.org>
2014-06-27 17:18       ` markdown_attribute Jan Ulrich Hasecke
2014-06-27 17:19   ` markdown_attribute John MacFarlane
     [not found]     ` <20140627171930.GB20448-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-06-27 17:31       ` markdown_attribute Jan Ulrich Hasecke
     [not found]         ` <53ADAA67.5090801-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2014-06-27 18:04           ` markdown_attribute John MacFarlane
     [not found]             ` <20140627180400.GB29268-0VdLhd/A9Pm0ooXD8Eul3cvGpKv5k03bTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-06-27 18:08               ` markdown_attribute Jan Ulrich Hasecke
2014-06-27 22:26               ` markdown_attribute BP Jonsson
     [not found]                 ` <53ADEF82.3000809-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-27 23:27                   ` markdown_attribute John MacFarlane
     [not found]                     ` <20140627232757.GD29984-0VdLhd/A9Pm0ooXD8Eul3cvGpKv5k03bTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-06-28 15:01                       ` markdown_attribute BP Jonsson

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