GitbookIO / kramed

A markdown (kramdown compatible) parser and compiler. Built for speed. (Fork of marked)
MIT License
223 stars 47 forks source link

Heading mods #5

Closed 13protons closed 9 years ago

13protons commented 9 years ago

Here's a quick pass at adding the behavior specified in this issue https://github.com/GitbookIO/kramed/issues/4

This idea is to

I'm fairly new to regex, so I'd expect that this could be made more robust.

This approach fails on more than one #ID in the atrribute block {#ID}

Wishlist for these mods would be to match this behavior https://michelf.ca/projects/php-markdown/extra/#spe-attr so there can be multiple IDs and Classes passed through the attribute block. It'll probably be slower, so this can be called '**Kramed, built for speed***'

AaronO commented 9 years ago

@alanguir Thanks. It looks good !