[kramdown-users] Zcaron/zcaron not valid HTML references

Shawn Van Ittersum svicalifornia at gmail.com
Fri Jul 9 09:07:01 EDT 2010

Calling it entity_transform suggests that the entities will be transformed in kramdown's internal representation, losing the original input state in case it's needed for other purposes.  If that's how Thomas intends to implement it, then the name is appropriate.  But if Thomas is going to store the input state regardless and change the entities on output, then entity_output may be preferable for clarity.

The "to_" prefixes on the values for this option are not necessary.  Though Ruby-like in some sense, that convention is really more for method names.  If there were a way to specify an arbitrary method name for the entity transformation, then using "to_" prefixes would make more sense.  However, that doesn't seem to be on the menu.

The no-op setting of "none" suggests an influence from CSS, so the more applicable convention would be the CSS "text-transform" rule, whose potential values do not have a "to_" prefix.


On Fri, 9 Jul 2010 03:13:57 -0700, Matt Neuburg wrote:
> Since it is not a matter of outputting everything as entities, but 
> only of what is to be done with input entities, I suggest calling 
> this entity_transform, with values none, to_numeric, to_symbolic, and 
> to_char. m.
> Sent from my iPad, but I am not a dork. Really.
> On Jul 8, 2010, at 11:32 PM, Thomas Leitner <t_leitner at gmx.at> wrote:
>> On 2010-07-07 23:39 +1000 Shawn Van Ittersum wrote:
>>> On Wed, 7 Jul 2010 13:57:45 +0200, Thomas Leitner wrote:
>>>> The internal representation could easily be augmented but I don't
>>>> know if this is really useful - is there a use case where
>>>> `&#x017e;` is "better" than `&#382;`?
>>> Rather than ask whether such a use case exists -- which perhaps we
>>> won't know until it is encountered -- we should ask why kramdown is
>>> doing this conversion.  These entities are specific representations
>>> of content, and it doesn't seem right that kramdown should change
>>> them or translate them to different forms without explicit
>>> configuration to do so.
>> Okay, then let's finish this thread by introducing a new option in
>> kramdown, named `entity_output` (anyone having a better name for this
>> option?), which can have the following values:
>> `as_input`
>>  : Output the entities as found in the input
>> `numeric`
>>  : Always output entities in decimal numeric form
>> `symbolic`
>>  : Output entities using the symbol if available, else in decimal
>>    numeric fom
>> `as_char`
>>  : Only available under Ruby 1.9: output the entity as character if
>>    possible, else output the same as with `as_input` (this is the
>>    default)
>> This new option replaces the `numeric_entities` option which is
>> deprecated from now on and will be removed in a future release. I have
>> pushed the latest changes to github.
>> -- Thomas
>> _______________________________________________
>> 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