Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Fix position of annotations
Browse files Browse the repository at this point in the history
Use Nokogiri to re-position annotations at the bottom of the page.
  • Loading branch information
joegatt committed Aug 9, 2013
1 parent aaeed49 commit 2807305
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/helpers/formatting_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ def clean_up_via_dom(text)
end
# tidy = Nokogiri::XSLT File.open('vendor/tidy.xsl')
# dom = tidy.transform(dom)

# PATCH: Moves annotations to the end
dom.at_css('.annotations').parent = dom.at_css('body') unless dom.at_css('.annotations').blank?
dom.css('body').children.to_html.html_safe
end

Expand Down

0 comments on commit 2807305

Please sign in to comment.