We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
render = ::Redcarpet::Render::HTML.new(hard_wrap: false) extensions = { no_intra_emphasis: true, tables: true, autolink: true, strikethrough: true, disable_indented_code_blocks: true, superscript: true, } parser = ::Redcarpet::Markdown.new(render, extensions)
Example 1, the URL can be parsed as a <a> tag, it works.
<a>
subject.render("<html>\n\n<div>www.test.com</div></html>") # => "<p><html></p>\n\n<p><div><a href=\"http://www.test.com\">www.test.com</a></div></html></p>\n"
Example 2, the first URL cannot be parsed as a <a> tag, only the second URL works.
subject.render("<html>\n\n<div>www.test.com</div>\n\n<div>www.test.com</div></html>") # => "<p><html></p>\n\n<div>www.test.com</div>\n\n<p><div><a href=\"http://www.test.com\">www.test.com</a></div></html></p>\n"
Example 3, both URLs can be parsed correctly, the difference is there is only one line break in front of the first <div>.
<div>
subject.render("<html>\n<div>www.test.com</div>\n\n<div>www.test.com</div></html>") # => "<p><html>\n<div><a href=\"http://www.test.com\">www.test.com</a></div></p>\n\n<p><div><a href=\"http://www.test.com\">www.test.com</a></div></html></p>\n"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example 1, the URL can be parsed as a
<a>
tag, it works.Example 2, the first URL cannot be parsed as a
<a>
tag, only the second URL works.Example 3, both URLs can be parsed correctly, the difference is there is only one line break in front of the first
<div>
.The text was updated successfully, but these errors were encountered: