parsedown-extra
parsedown-extra copied to clipboard
Misc bugfix and improved attribute parsing
Fixed issues #83 and #100
Thanks, I'll try to review / merge this by the end of the week.
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 :).
Just noticed this as well. It seems quite useful for image dimensions, or should I do this differently?
{width=100}
@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 Thank you! :+1:
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 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 Thank you for this quick adjustment. I hope your fix will become part of the distribution of ParsedownExtra soon.