-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
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
no new line char in code inside <pre> tag #77
Comments
require 'spec_helper'
describe ReverseMarkdown::Converters::Pre do
let(:converter) { ReverseMarkdown::Converters::Pre.new }
it 'preserves new lines as <br> and \n' do
node = node_for("<pre>one\ntwo\nthree<br>four</pre>")
expect(converter.convert(node)).to include "\n\n one\n two\n three\n four\n\n"
end
end Run rspec spec/lib/reverse_markdown/converters/pre_spec.rb
..F.......
Failures:
1) ReverseMarkdown::Converters::Pre for standard markdown preserves new lines as <br> and \n
Failure/Error: expect(converter.convert(node)).to include "\n\n one\n two\n three\n four\n\n"
expected "\n\n one two three\n four\n\n" to include "\n\n one\n two\n three\n four\n\n"
Diff:
@@ -1,2 +1,5 @@
-\n\n one\n two\n three\n four\n\n
+
+
+ one two three
+ four
# ./spec/lib/reverse_markdown/converters/pre_spec.rb:22:in `block (3 levels) in <top (required)>'
Finished in 0.0264 seconds (files took 0.31485 seconds to load)
10 examples, 1 failure |
shivabhusal
added a commit
to shivabhusal/reverse_markdown
that referenced
this issue
Oct 2, 2019
shivabhusal
added a commit
to shivabhusal/reverse_markdown
that referenced
this issue
Oct 2, 2019
shivabhusal
added a commit
to shivabhusal/reverse_markdown
that referenced
this issue
Oct 2, 2019
shivabhusal
added a commit
to shivabhusal/reverse_markdown
that referenced
this issue
Oct 2, 2019
xijo
added a commit
that referenced
this issue
Oct 31, 2021
Lets \n to be present in <pre> tag. solves #77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input
is rendered into
Expected
It should have rendered newline chars
\n
inside<pre>
tag where there is no<code>
tag inside.The HTML is extracted from by blog at https://cbabhusal.wordpress.com . Wordpress does not put
<code>
tag inside<pre>
tag.Code
The text was updated successfully, but these errors were encountered: