Skip to content

h1 - h6 elements show pilcrow and arrow-up at end of line #291

Open
@DHB

Description

@DHB

I noticed this already in many ruby docs published in the web & found it annoying in my own docs.

To reproduce:

$ cat para.rdoc

=== Shows an annoying paragraph & arrow when you hover over me --->
$ rdoc -o doc para.rdoc

Render the produced HTML and hover over the element.

The "hardcoded" paragraph sign and arrow-up sign stem from:

lib/rdoc/markup/to_html.rb:288:      @res << "<span><a href=\"##{label}\">&para;</a>"

and from

lib/rdoc/markup/to_html.rb:289:   @res << " <a href=\"#documentation\">&uarr;</a></span>"

When I removed the above, the generated docs looked OK at a first glance.

Is this eventually just a "leftover" from debugging?

I could not run the test-suite (on windows) because of another not related windows issue with the pathname method used in RDoc.

However, &para is in:

test/test_rdoc_generator_markup.rb:40:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:26:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:34:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:41:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:48:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:55:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:62:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:71:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:350:    links = '<span><a href="#label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:362:    links = '<span><a href="#class-Foo-label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:375:    links = '<span><a href="#method-i-foo-label-Hello">&para;</a> ' +
test/test_rdoc_markup_to_html.rb:407:    assert_equal "\n<h1>Hello<span><a href=\"#label-Hello\">&para;</a> <a href=\"#documentation\">&uarr;</a></span></h1>\n", @to.res.join   

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions