1
0
mirror of https://github.com/danbee/micropub.git synced 2025-03-04 08:59:13 +00:00

Remove double backslashes

This must be a bug in Kramdown.
This commit is contained in:
Daniel Barber 2019-11-17 23:00:38 -05:00
parent 695825d230
commit 1f1afc99e8
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
2 changed files with 8 additions and 6 deletions

View File

@ -63,8 +63,10 @@ module Micropub
params["content"]["text"]
elsif params["content"]["html"]
Kramdown::Document.
new(params["content"]["html"], html_to_native: true).
to_kramdown
new(params["content"]["html"], input: "html").
to_kramdown.
gsub("\\", "")
# TODO: Look into possible Kramdown bug
end
end
@ -82,7 +84,7 @@ module Micropub
#{post_frontmatter.strip}
---
#{content}
#{content.strip}
POST
end
end

View File

@ -170,11 +170,11 @@ describe Micropub::Post do
_(post.content.strip).must_equal <<~MARKDOWN.strip
This is a test post, with some lists and stuff.
> Well, the way they make shows is, they make one show. That show\\'s
> Well, the way they make shows is, they make one show. That show's
> called a pilot. Then they show that show to the people who make shows,
> and on the strength of that one show they decide if they\\'re going to
> and on the strength of that one show they decide if they're going to
> make more shows. Some pilots get picked and become television
> programs. Some don\\'t, become nothing. She starred in one of the ones
> programs. Some don't, become nothing. She starred in one of the ones
> that became nothing.
* One