Skip to content
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

Maruku can't handle Headers in comments #115

Closed
Shikaga opened this issue Dec 16, 2013 · 12 comments
Closed

Maruku can't handle Headers in comments #115

Shikaga opened this issue Dec 16, 2013 · 12 comments
Milestone

Comments

@Shikaga
Copy link

Shikaga commented Dec 16, 2013

If you create a comment with a header within it, Maruku breaks down.

| Maruku tells you:
+---------------------------------------------------------------------------
| REXML cannot parse this block of HTML/XML:
| |

Interestingly, it will work fine if the header is denoted by just a single dash ("-")

@distler
Copy link
Collaborator

distler commented Dec 16, 2013

A known problem with REXML.

Nokogiri handles this just fine.

@bhollis
Copy link
Owner

bhollis commented Dec 16, 2013

Not a known issue to me - we have no test that shows this behavior. I'll add one.

@distler
Copy link
Collaborator

distler commented Dec 16, 2013

I guess you're new here (follow the links).

@bhollis
Copy link
Owner

bhollis commented Dec 17, 2013

Yeah, I haven't read your blog. Anything not checked in as a pending test is officially not a "known issue" to the Maruku project.

@distler
Copy link
Collaborator

distler commented Dec 17, 2013

REXML, at least circa 2008 when that blog post was written, was notoriously buggy. That's why I decided to switch my branch of Maruku (and all my other projects) to Nokogiri.

I haven't kept track of which REXML bugs have been fixed in the interim. Evidently, there are a few remaining.

Whatever REXML bugs remain, I wouldn't expect them to be tracked as "known issues" in Maruku.

@distler
Copy link
Collaborator

distler commented Dec 17, 2013

I haven't kept track of which REXML bugs have been fixed in the interim.

Actually, it appears that nothing has changed since then. Sam Ruby (my interlocutor in that blog post) went on a tear, submitting REXML patches, shortly after that blog post was written. Since then ... nothing. Any bugs that Sam didn't fix in 2008 are still unfixed.

@distler
Copy link
Collaborator

distler commented Dec 17, 2013

In this case, however, one could argue that this isn't really a REXML bug. Nokogiri is being too generous.

@bhollis
Copy link
Owner

bhollis commented Dec 17, 2013

You may opt in to the Nokogiri-based XML parsing by setting :html_parser => 'nokogiri'. However, I will continue to work around bugs in REXML as long as it is the default XML parser that ships with Ruby.

@distler
Copy link
Collaborator

distler commented Dec 17, 2013

Here, then, are some tests you may find useful.

@bhollis
Copy link
Owner

bhollis commented Dec 21, 2013

@distler, please file PRs when you fix bugs like this - it's no fun to spend time fixing them just to find out they've already been fixed on your fork.

@distler
Copy link
Collaborator

distler commented Dec 22, 2013

I didn't submit a PR because I didn't think that what I had done fixed the problem under REXML. (It works under Nokogiri, which is all that I cared about.)

@Shikaga
Copy link
Author

Shikaga commented Dec 22, 2013

Thanks for the quick turnaround. Hopefully this bug can be pulled upstream into Github Pages soon.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants