]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc build: fix links to duplicate html anchors.
authorGraham Percival <graham@percival-music.ca>
Sat, 23 Jan 2010 13:20:45 +0000 (13:20 +0000)
committerGraham Percival <graham@percival-music.ca>
Sat, 23 Jan 2010 13:20:45 +0000 (13:20 +0000)
Fix issue #957.  texi2html still creates two html anchors, but at
least we link to the right one, so the website pages load
correctly.

Documentation/lilypond-texi2html.init

index bfd88624a36388e920747ec43392687caf28d90a..9635e3a41b9f206d7756ea9dd51669c43f42b586 100644 (file)
@@ -879,8 +879,14 @@ sub lilypond_element_target_name($$$)
   }
   # TODO: Once texi2html correctly prints out the target and not the id for
   #       the sections, change this back to ($id, $target)
+  # I don't understand this comment, so I'm reluctant to delete it -gp
   $target = lc($target);
-  return ($target, $target);
+  if ($target eq lc($id)) {
+    $id = "";
+  } else {
+    $id = substr($id, 0, - 2); # remove the "-1"
+  }
+  return ($id, $target);
 }