[kramdown-users] Inline comments

Eric Sunshine sunshine at sunshineco.com
Sun Apr 11 22:59:49 EDT 2010


On 4/11/2010 4:46 PM, Shawn Van Ittersum wrote:
> Again, I advocate a single consistent syntax for kramdown
> directives,  which is currently: {: ... }

I agree with Shawn that a consistent syntax is preferable.

 > With that in mind, I suggest:
 >   {:comment} skip this {:/comment}

This feels unusually XML-like and inconsistent with the rest of the 
kramdown extension syntax. Also, it is hardly less verbose than the more 
obvious:

   {::comment:}skip this{::comment:}

Personally, given that {::comment:} already exists (though does not 
presently work in-line), I don't mind the verbosity.

 > or alternatively:
 >   There is something {:comment: skip this } hidden in this...

This also is reasonable. To be consistent with existing extension syntax 
(http://kramdown.rubyforge.org/syntax.html#extension-blocks), however, 
it would be:

   There is something {::comment:: skip this} hidden in this...

-- ES


On 4/11/2010 4:46 PM, Shawn Van Ittersum wrote:
> Those won't work because kramdown text may contain bits of other languages where those parentheses or hash marks must be preserved, not interpreted by kramdown.
>
> Again, I advocate a single consistent syntax for kramdown directives, which is currently:  {: ... }
>
> With that in mind, I suggest:
>
>     {:comment} skip this {:/comment}
>
> or alternatively:
>
>     There is something {:comment: skip this } hidden in this sentence.
>
> Shawn
>
> On Sun, 11 Apr 2010 21:48:28 +0200, Michael Franzl wrote:
>> Thomas Leitner wrote:
>>>> Would it make sense to implement inline comments, like in this ERB
>>>> example:
>>>>
>>>>       This text is completely<%# find better word %>  ignored by
>>>
>>> Yeah, it would be nice to have an inline syntax for extensions like
>>> `comment`. However, I don't think that the block syntax for extensions
>>> should be used inline because of its verbosity. Any suggestions?
>>
>> What about
>>
>>     This is a ((comment))
>>
>> or
>>
>>     This is a #comment#
>>
>> Michael
>>
>> _______________________________________________
>> kramdown-users mailing list
>> kramdown-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/kramdown-users
> _______________________________________________
> kramdown-users mailing list
> kramdown-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/kramdown-users
>


More information about the kramdown-users mailing list