Fixes #426.
Showing the changes to lib/docs (2 of 3 files). Show all
Unified · Split
| @@ -22,13 +22,15 @@ module Docs · 21 unmodified lines | ||
| 22 | 22 | end |
| 23 | 23 | |
| 24 | 24 | css('h1', 'h2', 'h3', 'dt').each do |node| |
| 25 | + links = node.css('a').remove | |
| 25 | 26 | node.content = node.content |
| 27 | + node << links | |
| 26 | 28 | end |
| 27 | 29 | |
| 28 | 30 | css('div[class^="highlight-"]').each do |node| |
| 29 | 31 | node.name = 'pre' |
| 30 | 32 | node['class'] = node['data-language'] = case node['class'] |
| 31 | − when 'highlight-python' then 'python' | |
| 33 | + when 'highlight-python', 'highlight-default' then 'python' | |
| 32 | 34 | when 'highlight-html+django' then 'markup' |
| 33 | 35 | else '' |
| 34 | 36 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Django |
| 3 | 3 | class FixUrlsFilter < Filter |
| 4 | 4 | def call |
| 5 | − html.gsub! %r{#{Regexp.escape(Django.base_url)}([^"']+?)\.html}, "#{Django.base_url}\\1/" | |
| 5 | + html.gsub! %r{#{Regexp.escape(context[:base_url].to_s)}([^"']+?)\.html}, "#{context[:base_url]}\\1/" | |
| 6 | 6 | html |
| 7 | 7 | end |
| 8 | 8 | end |