Permalink
Browse files

Revert "Added id to HTML anchors for ePub navpoints."

This reverts commit 44b6c78.

Let's use id tags on the headings for ePub instead.
  • Loading branch information...
1 parent 44b6c78 commit ae5dd4cbd165ddb5cf0792eee4b53c426da89b8a @chromatic committed Mar 20, 2012
Showing with 12 additions and 16 deletions.
  1. +4 −3 lib/Pod/PseudoPod/DOM/Role/XHTML.pm
  2. +1 −1 t/html/basic.t
  3. +1 −1 t/html/figures.t
  4. +3 −6 t/html/sections.t
  5. +3 −5 t/html/tags.t
View
7 lib/Pod/PseudoPod/DOM/Role/XHTML.pm
@@ -283,9 +283,10 @@ sub emit_literal
sub emit_anchor
{
- my $self = shift;
- my $anchor = $self->emit_kids( encode => 'index_anchor' );
- return qq|<a name="$anchor" id="nav_$anchor"></a>|;
+ my $self = shift;
+ return qq|<a name="|
+ . $self->emit_kids( encode => 'index_anchor' )
+ . qq|"></a>|;
}
sub emit_italics
View
2 t/html/basic.t
@@ -220,7 +220,7 @@ $result = parse( <<'EOPOD' );
A plain paragraph with a Z<crossreferenceendpoint>.
EOPOD
is($result, <<"EOHTML", "Link anchor entity in a paragraph");
-<p>A plain paragraph with a <a name="crossreferenceendpoint" id="nav_crossreferenceendpoint"></a>.</p>
+<p>A plain paragraph with a <a name="crossreferenceendpoint"></a>.</p>
EOHTML
View
2 t/html/figures.t
@@ -14,7 +14,7 @@ use_ok( 'Pod::PseudoPod::DOM' ) or exit;
my $file = read_file( catfile( qw( t test_file.pod ) ) );
my ($doc, $result) = parse_with_anchors( $file );
-like_string $result, qr/<p><a name="figure_link" id="nav_figure_link">/,
+like_string $result, qr/<p><a name="figure_link">/,
'figure should start a figure environment';
like_string $result, qr!<img src="some/path/to/image_file.png"!,
'... without quoting image file paths';
View
9 t/html/sections.t
@@ -33,22 +33,19 @@ like_string $result, qr!<h4>c heading</h4>!,
like_string $result, qr!<h1>Another Suppressed Heading</h1>!,
'... chapter title TOC suppression should create heading';
-like_string $result,
- qr/<a name="AnotherSuppressedHeading" id="nav_AnotherSuppressedHeading">/,
+like_string $result, qr/<a name="AnotherSuppressedHeading">/,
'... but with anchor';
like_string $result, qr!<h2>A Suppressed Heading</h2>!,
'... section title suppression should create heading';
-like_string $result,
- qr/<a name="ASuppressedHeading" id="nav_ASuppressedHeading">/,
+like_string $result, qr/<a name="ASuppressedHeading">/,
'... but with anchor';
like_string $result, qr!<h3>Yet Another Suppressed Heading</h3>!,
'... subsection title suppression should create heading';
-like_string $result,
- qr/<a name="YetAnotherSuppressedHeading" id="nav_YetAnotherSuppressedHeading">/,
+like_string $result, qr/<a name="YetAnotherSuppressedHeading">/,
'... but with anchor';
like_string $result,
View
8 t/html/tags.t
@@ -14,15 +14,13 @@ use_ok( 'Pod::PseudoPod::DOM' ) or exit;
my $file = read_file( catfile( qw( t test_file.pod ) ) );
my $result = parse_with_anchors( $file );
-like_string $result,
- qr!<a name="startofdocument" id="nav_startofdocument"></a>!m,
+like_string $result, qr!<a name="startofdocument"></a>!m,
'Z<> tags should become anchors';
-like_string $result, qr!<a name="next_heading" id="nav_next_heading"></a>!m,
+like_string $result, qr!<a name="next_heading"></a>!m,
'... without normal escaping';
-like_string $result,
- qr!<a name="slightlycomplex\?heading" id="nav_slightlycomplex\?heading"></a!,
+like_string $result, qr!<a name="slightlycomplex\?heading"></a>!,
'... and escaping non-alphanumerics';
like_string $result, qr!<a class="url" href="http://www.google.com/">!,

0 comments on commit ae5dd4c

Please sign in to comment.