From 63f4a15d91c22a813d58c1b9a42dae19ee01f349 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 13 Jan 2006 12:14:05 +0100 Subject: [PATCH] Add ending punctuation for one-liners; fix missing ending ';' --- doc/tools/code2doc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/tools/code2doc b/doc/tools/code2doc index 979c8f19..6513ffe7 100755 --- a/doc/tools/code2doc +++ b/doc/tools/code2doc @@ -38,9 +38,9 @@ while (<>) { my $end = s/\s*\*+\//\n/ ? 'yes' : undef; - if ($end and /[^=]*[\s*](\w+)[\s:,;].*\/\*:\s*(.*)/) { + if ($end and /[^=]*[\s*](\w+)[\s:,;].*\/\*:\s*(.*)([.]\s*)?$/) { # Implicit id for enum values and struct members. - print "\nid:[$idpath$1]::\n\t$2\n"; + print "\nid:[$idpath$1]::\n\t$2.\n"; } elsif ($inblock) { # Redo the indentation, preserve empty lines. @@ -65,7 +65,7 @@ while (<>) while (not /(struct|enum|typedef|[^=])*[\s*](\w+).*[\[:,;{]/) { my $line = $_; $_ .= <>; - last if $_ eq $line + last if $_ eq $line; } if (/struct\s+(\w+)\s*{/) {