Re: header syntax.

On 21 November 2012 15:44, David J. Weller-Fahy
<dave-lists-public-markdown@weller-fahy.com> wrote:
> * Dave Pawson <dave.pawson@gmail.com> [2012-11-21 10:32 -0500]:
>> On 21 November 2012 14:29, Shane McCarron <ahby@aptest.com> wrote:
>> > As to processing precedence order, I think it should be:
>> >
>> > 1. # headerText with optional trailing # and optional ID text
>> > 2. headerText followed by /^=+/ or /^-+/
>> >
>> > If a processor encounters both, the header level determined from (1) above
>> > is used, and the dividing line is ignored.
>>
>> Have you seen other implementations which have a defined  precedence?
>>
>> I am -1 on any form of precedence. All I can see is confusion (users)
>> and being ignored (implementation).
>
> The thing which immediately came to mind when reading the above
> description was that if a processor encountered both, the /^=+/ or /^-+/
> should be treated as a horizontal rule.  However, neither Markdown.pl
> 1.0.1 or 1.0.2b8 produce that.  For both, with the input
>
> #v+
> # Header 1 #
> ------------
> #v-
>
> results in the output
>
> #v+
> <h2># Header 1 #</h2>
> #v-
>

I just tried it with the perl implementation and the output resulted
(as expected)


<h1>v+</h1>

<h1>Header 1</h1>

<h1>v-</h1>


> Something for an extension, perhaps,


I think id values are a good target for extensions.


regards




-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

Received on Wednesday, 21 November 2012 16:46:55 UTC