From 8435daa5985d4b2277f562de9b19e48792e20391 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Wed, 9 May 2012 15:37:42 +0200 Subject: [PATCH] Stop anchor highlighting --- lib/extensions/toc.rb | 3 ++- lib/gollum/frontend/public/gollum/css/template.css | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/extensions/toc.rb b/lib/extensions/toc.rb index ab1889f3..00de2670 100644 --- a/lib/extensions/toc.rb +++ b/lib/extensions/toc.rb @@ -43,7 +43,8 @@ module Gollum::Extensions def insert_anchors find_headings.each do |h| rep_h = Nokogiri::XML::Node.new('a', @doc) - rep_h['name'] = anchor_id(h.content) + rep_h['class'] = 'wiki-toc-anchor' + rep_h['id'] = anchor_id(h.content) rep_h.add_child(h.clone) h.replace(rep_h) end diff --git a/lib/gollum/frontend/public/gollum/css/template.css b/lib/gollum/frontend/public/gollum/css/template.css index 119c2395..3ee75697 100644 --- a/lib/gollum/frontend/public/gollum/css/template.css +++ b/lib/gollum/frontend/public/gollum/css/template.css @@ -26,6 +26,11 @@ a.absent { color: #c00; } +.markdown-body a[id].wiki-toc-anchor { + color: inherit; + text-decoration: none; +} + .markdown-body { font-size: 14px; line-height: 1.6;