Closed mhuggins closed 9 years ago
Looks like a better way of parsing the content! Without the restriction of specific libs
Yeah, I don't know if I like the option name of parse
, maybe parser
or something would be better. Definitely open to revise this, but I'd like to have the option of using a third party regardless, primarily with my XSS concern. :)
Parser would indeed be a better option I think!
Branch updated! Not sure if I have to recreate the pull request? I thought committing to the same branch would update the PR automatically (or at least used to), but apparently not anymore.
I rebased the branch, and that seems to have made the pull request update. Not sure if GH changed their approach or something since the PR didn't update with the additional commit before squashing. Weird!
Normally the PR should update, did you push the changes? But a rebase/squash and force push does the job too!
Yeah, I definitely did! I was surprised it wasn't updating just as well. I verified the changes were showing in the commit history on the GH branch. Wondering if there was a callback issue on GH's servers or something.
@toopay, @lodev09 you guys are ok with the name of the option and the possibility to defined your custom parser instead of the build-in parsers?
@acrobat As long as it doesn't break compatibility, i'm happy.
As far as I can see BC breaks are avoided!
@acrobat If you doesn't have any further suggestion to @mhuggins than your last review, i'll let you push the green button.
Thanks @mhuggins!
@mhuggins can you just send a PR to the gh-pages branch to add some docs about this feature?
Happy to do this! I'll try to do it as soon as I get home from work tomorrow. :) Thanks for merging!
I would like to use this feature Support any markdown parser via option #167, but can not find the documentation for it. Can you tell me where I can find it? Thanks.
This permits any parser to be used regardless of its interface. My reason for wanting this is that I'd like to use markdown-it since it is stricter, as both markdown.js and marked share the same XSS vulnerability. The problem is that markdownit is not referred to as
markdown
ormarked
in the window namespace, and its function for converting markdown to HTML is namedrender
rather thantoHTML
.This change will allow a new
parse
option to be supplied when calling bootstrap-markdown's$.fn.markdown
method, which is a function definition that is called in place of the existing options. (I maintained the existing options for backward compatibility.) For example: