changeset 22175:2258495e864a

* mk-doc-cache.pl: Fix substitutions to escape block comment markers.
author John W. Eaton <jwe@octave.org>
date Mon, 25 Jul 2016 09:49:28 -0400
parents 8358b9ef5def
children 0f22502738fa
files doc/interpreter/mk-doc-cache.pl
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/mk-doc-cache.pl	Sun Jul 24 12:51:12 2016 -0400
+++ b/doc/interpreter/mk-doc-cache.pl	Mon Jul 25 09:49:28 2016 -0400
@@ -31,6 +31,8 @@
 $output_file = shift (@ARGV);
 $top_srcdir = shift (@ARGV);
 
+$amp = "@";
+
 ## Constant patterns.
 
 $doc_delim = "\x{1d}";
@@ -83,7 +85,8 @@
 
           ## Escapes for symbol names.
 
-          s/$doc_delim_pat(([#%]|)[{}]|@)/$doc_delim@$1/;
+          s/$doc_delim_pat([{}@])/$doc_delim$amp$1/;
+          s/$doc_delim_pat([#%])([{}])/$doc_delim$1$amp$2/;
           $text .= $_;
         }
     }
@@ -91,7 +94,7 @@
 
 $text .= $doc_delim;
 
-($fh, $file) = tempfile (UNLINK => 1);
+($fh, $file) = tempfile ();
 print $fh "$text";
 close ($fh);