qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 02/32] texi2pod: Support @verbatim environment


From: Markus Armbruster
Subject: [Qemu-devel] [RFC PATCH 02/32] texi2pod: Support @verbatim environment
Date: Mon, 2 Oct 2017 17:25:22 +0200

Signed-off-by: Markus Armbruster <address@hidden>
---
 scripts/texi2pod.pl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl
index 39ce584a32..2171f8b819 100755
--- a/scripts/texi2pod.pl
+++ b/scripts/texi2pod.pl
@@ -85,6 +85,13 @@ if (defined $out) {
 
 while(defined $inf) {
 while(<$inf>) {
+    # Verbatim environment
+    if (defined $endw and $endw eq "verbatim"
+       and not (/address@hidden([a-z]+)/ and $1 eq $endw)) {
+       $section .= "\t".$_;
+       next;
+    }
+
     # Certain commands are discarded without further processing.
     /^\@(?:
         [a-z]+index            # @*index: useful only in complete manual
@@ -165,7 +172,7 @@ while(<$inf>) {
        if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
            $skipping = pop @skstack;
            next;
-       } elsif ($ended =~ /^(?:example|smallexample|display
+       } elsif ($ended =~ /^(?:example|smallexample|display|verbatim
                             |quotation|deftp|deftypefn)$/x) {
            $shift = "";
            $_ = "";    # need a paragraph break
@@ -311,7 +318,7 @@ while(<$inf>) {
        $_ = "\n=over 4\n";
     };
 
-    /^\@((?:small)?example|display)/ and do {
+    /^\@((?:small)?example|display|verbatim)/ and do {
        push @endwstack, $endw;
        $endw = $1;
        $shift = "\t";
-- 
2.13.6




reply via email to

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