Support any markdown parser via option#167
Conversation
|
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 |
|
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. |
c43e9a1 to
fced7dc
Compare
|
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. |
|
@acrobat As long as it doesn't break compatibility, i'm happy. |
|
As far as I can see BC breaks are avoided! |
|
Thanks @mhuggins! |
Support any markdown parser via option
|
@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
markdownormarkedin the window namespace, and its function for converting markdown to HTML is namedrenderrather thantoHTML.This change will allow a new
parseoption to be supplied when calling bootstrap-markdown's$.fn.markdownmethod, which is a function definition that is called in place of the existing options. (I maintained the existing options for backward compatibility.) For example: