span span span span #122

Open
TrevorBramble opened this Issue Dec 1, 2013 · 5 comments

Comments

Projects
None yet
3 participants

Somehow I'm screwing this up. When I go to update the docs to take into account a change in the reloader library, its page has all this extra markup in it now.

My commit seems innocent. sinatra/sinatra-contrib@49808be

Any ideas?

-<h1>Sinatra::Reloader</h1>
+<h1 id="label-Sinatra%3A%3AReloader">Sinatra::Reloader<span><a href="#label-Sinatra%3A%3AReloader">&para;</a> <a href="#documentation">&uarr;</a></span></h1>

image

Contributor

randomecho commented Dec 1, 2013

Looks like it's how rdoc is converting headings.

The test shows this:

it 'renders inline rdoc strings' do
  rdoc_app { rdoc '= Hiya' }
  assert ok?
  assert_body(/<h1[^>]*>Hiya(<span><a href=\"#label-Hiya\">&para;<\/a> <a href=\"#documentation\">&uarr;<\/a><\/span>)?<\/h1>/)
end
Owner

zzak commented Dec 1, 2013

It's because we're using RDoc, we have to update the output_decoration option.. I'll investigate.

@zzak Found us a clue already? Do we need to reformat all of the docs for RDoc now?

Owner

zzak commented Dec 10, 2013

@TrevorBramble Sorry I haven't had time to investigate our use case, but if you check rdoc/rdoc#199 we've implemented an option to ignore this output in headings

@zzak zzak self-assigned this Oct 6, 2014

Owner

zzak commented Jul 25, 2016

This is something I think we have to fix upstream in RDoc.

Current implementation just adds these links automatically, or you can change their appearance.

There is no autoshow/hide effect currently, something like how Github renders headings on README documents.

I think we can add to a future release of RDoc (and use that version when building our docs). Until then, I will leave this ticket open for reference.

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