diff doc/interpreter/munge-texi.cc @ 3301:02866242d3ae

[project @ 1999-10-20 04:10:46 by jwe]
author jwe
date Wed, 20 Oct 1999 04:10:53 +0000
parents bfe1573bd2ae
children 27502f8b3ba7
line wrap: on
line diff
--- a/doc/interpreter/munge-texi.cc
+++ b/doc/interpreter/munge-texi.cc
@@ -1,6 +1,7 @@
 #include <iostream.h>
 #include <fstream.h>
 #include <string>
+#include <cctype>
 #include <map>
 
 static const char doc_delim = '';
@@ -114,7 +115,25 @@
 		  if (is.eof ())
 		    fatal ("end of file while reading @DOCSTRING command");
 		  else
-		    os << help_text[symbol_name];
+		    {
+		      string doc_string = help_text[symbol_name];
+
+		      int i = 0;
+		      while (doc_string[i] == ' ')
+			i++;
+
+		      if (doc_string.substr (i, 15) == "-*- texinfo -*-")
+			{
+			  i += 15;
+
+			  while (isspace (doc_string[i]))
+			    i++;
+
+			  os << doc_string.substr (i);
+			}
+		      else
+			os << doc_string;
+		    }
 		}
 	      else
 		{