This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlvar: improve POD markup for $-[n] example
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Mon, 18 Mar 2019 15:47:26 +0000 (15:47 +0000)
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Mon, 18 Mar 2019 15:48:39 +0000 (15:48 +0000)
Closing and re-opening the C<> arond the I<> leads to weird formatting
in man/text mode.  Instead nest the I<> inside the C<>.

pod/perlvar.pod

index b42cbe2..1f9c08c 100644 (file)
@@ -1149,7 +1149,7 @@ This variable is read-only and dynamically-scoped.
 X<@-> X<@LAST_MATCH_START>
 
 C<$-[0]> is the offset of the start of the last successful match.
-C<$-[>I<n>C<]> is the offset of the start of the substring matched by
+C<$-[I<n>]> is the offset of the start of the substring matched by
 I<n>-th subpattern, or undef if the subpattern did not match.
 
 Thus, after a match against C<$_>, C<$&> coincides with C<substr $_, $-[0],