diff --git a/README.md b/README.md
index 43012cb..3068f2e 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ They are of the form:
```html
-
+ Link to Heading1 1 section
```
diff --git a/lib/table_of_contents/parser.rb b/lib/table_of_contents/parser.rb
index 23509cc..5d62817 100644
--- a/lib/table_of_contents/parser.rb
+++ b/lib/table_of_contents/parser.rb
@@ -26,7 +26,7 @@ def inject_anchors_into_html
@entries.each do |entry|
# NOTE: `entry[:id]` is automatically URL encoded by Nokogiri
entry[:header_content].add_previous_sibling(
- %()
+ %(Link to #{entry[:text]} section)
)
end
diff --git a/test/parser/test_inject_anchors_filter.rb b/test/parser/test_inject_anchors_filter.rb
index 61d00b9..5eb246c 100644
--- a/test/parser/test_inject_anchors_filter.rb
+++ b/test/parser/test_inject_anchors_filter.rb
@@ -12,7 +12,7 @@ def setup
def test_injects_anchors_into_content
html = @parser.inject_anchors_into_html
- assert_match(%r{Simple H1}, html)
+ assert_match(%r{Link to Simple H1 sectionSimple H1}, html)
end
def test_does_not_inject_toc