texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5415] * Texinfo/Convert/Plaintext.pm(_printindex_formatted), T


From: Patrice Dumas
Subject: [5415] * Texinfo/Convert/Plaintext.pm(_printindex_formatted), Texinfo/Common.pm,
Date: Sat, 15 Feb 2014 14:00:28 +0000

Revision: 5415
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5415
Author:   pertusus
Date:     2014-02-15 14:00:27 +0000 (Sat, 15 Feb 2014)
Log Message:
-----------
        * Texinfo/Convert/Plaintext.pm(_printindex_formatted), 
Texinfo/Common.pm, 
        doc/texinfo.texi: new customization variable INDEX_SPECIAL_CHARS_WARNING
        to warn about invalid index entries in Info.  Report from Glenn Morris.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/texinfo.texi
    trunk/tp/Texinfo/Common.pm
    trunk/tp/Texinfo/Convert/Plaintext.pm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-02-15 13:17:06 UTC (rev 5414)
+++ trunk/ChangeLog     2014-02-15 14:00:27 UTC (rev 5415)
@@ -1,6 +1,9 @@
 2014-02-15  Patrice Dumas  <address@hidden>
        * Texinfo/Convert/DocBook.pm: do not use lineannotation for 
        @r, the semantics are not the same.  Report from Aharon Robbins.
+       * Texinfo/Convert/Plaintext.pm(_printindex_formatted), 
Texinfo/Common.pm, 
+       doc/texinfo.texi: new customization variable INDEX_SPECIAL_CHARS_WARNING
+       to warn about invalid index entries in Info.  Report from Glenn Morris.
 
 2014-02-09  Karl Berry  <address@hidden>
 

Modified: trunk/doc/texinfo.texi
===================================================================
--- trunk/doc/texinfo.texi      2014-02-15 13:17:06 UTC (rev 5414)
+++ trunk/doc/texinfo.texi      2014-02-15 14:00:27 UTC (rev 5415)
@@ -18292,6 +18292,10 @@
 Symbol used between the index entry and the associated node or section;
 default @samp{:}.
 
address@hidden INDEX_SPECIAL_CHARS_WARNING
+If set, warn about @samp{:} in index entry, as it leads to invalid entries in
+index menus in output Info files.  For Info and plaintext only.
+
 @item INFO_SPECIAL_CHARS_WARNING
 If set, warn about problematic constructs for Info output (such as the
 string @samp{::}) in node names, menu items, and cross references;

Modified: trunk/tp/Texinfo/Common.pm
===================================================================
--- trunk/tp/Texinfo/Common.pm  2014-02-15 13:17:06 UTC (rev 5414)
+++ trunk/tp/Texinfo/Common.pm  2014-02-15 14:00:27 UTC (rev 5415)
@@ -259,6 +259,7 @@
   'MACRO_BODY_IGNORES_LEADING_SPACE', 'CHECK_HTMLXREF',
   'TEXINFO_DTD_VERSION', 'TEXINFO_COLUMN_FOR_DESCRIPTION',
   'TEXINFO_OUTPUT_FORMAT', 'INFO_SPECIAL_CHARS_WARNING',
+  'INDEX_SPECIAL_CHARS_WARNING',
 );
 # Not strings. 
 # FIXME To be documented somewhere, but where?

Modified: trunk/tp/Texinfo/Convert/Plaintext.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Plaintext.pm       2014-02-15 13:17:06 UTC (rev 
5414)
+++ trunk/tp/Texinfo/Convert/Plaintext.pm       2014-02-15 14:00:27 UTC (rev 
5415)
@@ -1238,12 +1238,12 @@
     $entry_text .= $self->convert_line($entry_tree, {'indent' => 0});
     next if ($entry_text !~ /\S/);
     # FIXME protect instead
-    #if ($entry_text =~ /:/) {
-      #$self->line_warn (sprintf($self->__("Index entry in address@hidden with 
: produces invalid Info: %s"),
-      #                           $entry->{'index_at_command'},
-      #    Texinfo::Convert::Texinfo::convert($entry_tree)), 
-      #                  $entry->{'command'}->{'line_nr'});
-    #}
+    if ($entry_text =~ /:/ and $self->get_conf('INDEX_SPECIAL_CHARS_WARNING')) 
{
+      $self->line_warn (sprintf($self->__("Index entry in address@hidden with 
: produces invalid Info: %s"),
+                                 $entry->{'index_at_command'},
+          Texinfo::Convert::Texinfo::convert($entry_tree)), 
+                        $entry->{'command'}->{'line_nr'});
+    }
 
     my $entry_nr = '';
     if (!defined($entry_counts{$entry_text})) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]