parsedown-extra icon indicating copy to clipboard operation
parsedown-extra copied to clipboard

Misc bugfix and improved attribute parsing

Open kael-shipman opened this issue 8 years ago • 8 comments

Fixed issues #83 and #100

kael-shipman avatar Dec 22 '16 16:12 kael-shipman

Thanks, I'll try to review / merge this by the end of the week.

erusev avatar Dec 27 '16 12:12 erusev

Hey! Any word on this yet? I'm using my own repo as a temp for my projects, but it would be nice to switch at some point. I don't mean to be impatient, though! Thanks for all you do :).

kael-shipman avatar Jan 31 '17 22:01 kael-shipman

Just noticed this as well. It seems quite useful for image dimensions, or should I do this differently?

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

fabd avatar Feb 11 '17 16:02 fabd

@fabd That seems like a perfect use case for this functionality. I'm not sure what the status is on the pull request (looks like it might be a bit of a wait), but it looks like you've got two options: Either use my fork in your project (which may only offer limited mileage, since I don't really need many of the other unimplemented features yet and probably won't work on them until I do) or create a patch from my pull request by adding .patch to the end of the url on this page (i.e., https://github.com/erusev/parsedown-extra/pull/101.patch).

kael-shipman avatar Feb 11 '17 17:02 kael-shipman

@kael-shipman Thank you! :+1:

fabd avatar Feb 11 '17 17:02 fabd

Hello kael-shipman. Thank you for your solution so that ParsedownExtra now supports attributes with the '=' signs. I am (heavily) using Parsedown to create a wiki based on Markdown and wanted to use this feature. I have a question: Why do you want the first character in $regexAttribute to be of the alphabet? Is it possible to also allow numbers [0-9]? I changed $regexAttribute and it seems to work. The reason I ask this is because I want to support paragraph names in my wiki that do start with a number.

If anyone is interested in my ParsedownWiki class I am happy to share it.

Smaele avatar Mar 14 '17 17:03 Smaele

@Smaele I had originally conceived of the alpha-character requirement because I wasn't thinking broadly enough about what we were parsing out of the curly braces. I was only thinking about the requirements for html attributes (which I had assumed could only begin with alpha characters, which also turns out to be false according to the spec).

So in short, I just screwed up! :) Adjusting now in my own repo.

kael-shipman avatar Mar 14 '17 17:03 kael-shipman

@kael-shipman Thank you for this quick adjustment. I hope your fix will become part of the distribution of ParsedownExtra soon.

Smaele avatar Mar 15 '17 04:03 Smaele