[master] 3f24251 Make $ lines terminate on the first '\n[^ \t]'.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 12 08:34:07 UTC 2018
commit 3f242510215f4b1cc896308903720f9a98270f28
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 12 08:32:27 2018 +0000
Make $ lines terminate on the first '\n[^ \t]'.
Add arg names to synopsis
diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index e866c80..e1770bb 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -422,9 +422,9 @@ class prototype(object):
t = i.vcl()
if t in privs:
continue
+ if i.nm is not None:
+ t += " " + i.nm
if not short:
- if i.nm is not None:
- t += " " + i.nm
if i.defval is not None:
t += "=" + i.defval
if i.opt:
@@ -843,18 +843,13 @@ class vcc(object):
s = a.split("\n$")
self.copyright = s.pop(0).strip()
while len(s):
- ss = s.pop(0)
- i = ss.find("\n\n")
- if i > -1:
- i += 1
- else:
- i = len(ss)
- inputline = ss[:i]
- c = ss[:i].split()
+ ss = re.split('\n([^\t ])', s.pop(0), maxsplit=1)
+ c = ss[0].split()
+ d = "".join(ss[1:])
m = dispatch.get(c[0])
if m is None:
err("Unknown stanze $%s" % ss[:i])
- m([c[0], " ".join(c[1:])], ss[i:].split('\n'), self)
+ m([c[0], " ".join(c[1:])], d.split('\n'), self)
inputline = None
def rst_copyright(self, fo):
diff --git a/lib/libvmod_debug/vmod.vcc b/lib/libvmod_debug/vmod.vcc
index c27e866..5e1ac0c 100644
--- a/lib/libvmod_debug/vmod.vcc
+++ b/lib/libvmod_debug/vmod.vcc
@@ -28,7 +28,6 @@
$Module debug 3 Development, test and debug
$ABI strict
$Prefix xyzzy
-
DESCRIPTION
===========
@@ -118,8 +117,7 @@ Encrypt the HTTP header with quad-ROT13 encryption,
$Function STRING argtest(
STRING one, REAL two =2, STRING three= "3",
STRING comma=",", INT four = 4,
- [ STRING opt]
-)
+ [ STRING opt])
$Function INT vre_limit()
More information about the varnish-commit
mailing list