ruby-readability icon indicating copy to clipboard operation
ruby-readability copied to clipboard

Loses links in h-titles, even when asked

Open cbetta opened this issue 13 years ago • 2 comments

Ran into a new issue. I am trying it to give me the content but keep a and h1 tags in place. It works fine for something like <h1>foo</h1> or <a href='#'>foo</a>, but the following example just gets lost: <h1><a href='#'>foo</a></h1>

cbetta avatar Jan 24 '12 16:01 cbetta

I figured it out. It works quite well if the <h1> and <a> are on seperate lines. I wrote my HTML on one line for testing purposes and it failed. Will see if I can give you a failing spec.

cbetta avatar Jan 24 '12 22:01 cbetta

Here is the failing test case: https://github.com/cbetta/ruby-readability/commit/485f38596af10d68abcc5849d3b5d98039f6493e

cbetta avatar Jan 24 '12 22:01 cbetta