erusev / parsedown-extra

Markdown Extra Extension for Parsedown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not parse attributes in curly braces (just classes and ids)

kael-shipman opened this issue · comments

As is, this library doesn't appear to parse attributes in curly braces. The regexAttribute property only matches strings starting with # and . (i.e., ids and classes), and the parseAttributeData method only parses out ids and classes.

I've performed this test:

*inline link*: 		[Google web page](http://www.google.it "google-title"){.google .link #link1}  
*labeled link*: 	[Google web page][ref-link2]
[ref-link2]:	http://www.google.it "google-title" {.link .google #link2}

at the parsedown extra test link

The results were:

cases MDE PDE
inline link class Y Y
id N N
labeled link class Y N
id N N

So Parsedown Extra fails with curled attributes in labeled links.
I do not understand why #id is not recognized by classic MDE.
Instead the PHP MD Extra library working in my Dokuwiki installation performs Y for all cases.
Have you got same results?

Regards,
Netsaver, Rome (IT)

I'm not quite sure what the status of this project is, but by the look of it, the implementation is lagging behind the spec. There appear to be a number of features specified in the README that aren't yet implemented. Looks like there's plenty of opportunity for us to get to work! ;)

Just noticed this as well. Is the proposed patch safe to use?

It seems quite useful for image dimensions, or should I do this differently?

![](/path/to/image.png){width=100}