kjdev / hoextdown

Hoextdown is an extension to Hoedown
MIT License
23 stars 15 forks source link

Special attributes ignored if link_attributes callback defined #14

Closed douyo closed 9 years ago

douyo commented 9 years ago

If you define a link_attributes callback in your renderer state, special attributes are ignored (e.g., {#id .class foo=bar}).

In our case, link_attributes was defined recently, and special attributes for links stopped working.

In rndr_link, it kind of looks like these are mutually exclusive.

if (state->link_attributes) {
    hoedown_buffer_putc(ob, '\"');
    state->link_attributes(ob, link, data);
    hoedown_buffer_putc(ob, '>');
} else if (attr && attr->size) {
            hoedown_buffer_putc(ob, '"');
    rndr_attributes(ob, attr->data, attr->size, NULL, data);
    hoedown_buffer_putc(ob, '>');