summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndres Mejia <amejia004@gmail.com>2012-02-03 21:13:01 -0500
committerAndres Mejia <amejia004@gmail.com>2012-02-05 14:25:26 -0500
commitf2de495ab495e45a3316284cb0984c30a2744232 (patch)
tree01032e9947e8e4930732ee2f9a2b400c4536e062 /doc
parente9421cc014e70942042cc2d40d1e315677f0f2b0 (diff)
downloadlibarchive-f2de495ab495e45a3316284cb0984c30a2744232.tar.gz
Fix spacing for all lines printed out.
This removes need to print out extra line per macro.
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/mdoc2mediawiki.awk16
1 files changed, 6 insertions, 10 deletions
diff --git a/doc/mdoc2mediawiki.awk b/doc/mdoc2mediawiki.awk
index fceb6286..9d585299 100755
--- a/doc/mdoc2mediawiki.awk
+++ b/doc/mdoc2mediawiki.awk
@@ -63,7 +63,7 @@ function endline() {
addclose(trailer)
trailer = ""
if(length(out) > 0) {
- print out
+ print out " "
out=""
}
if(displaylines > 0) {
@@ -138,7 +138,7 @@ function splitwords(l, dest, n, o, w) {
}
! /^\./ {
- out = $0 " "
+ out = $0
endline()
next
}
@@ -231,7 +231,7 @@ function splitwords(l, dest, n, o, w) {
section=wtail()
linecmd("== " section " ==")
} else if(match(words[w],"^Xr$")) {
- add("'''" words[++w] "'''(" words[++w] ")" words[++w] " ")
+ add("'''" words[++w] "'''(" words[++w] ")" words[++w])
} else if(match(words[w],"^Nm$")) {
if(match(section,"SYNOPSIS"))
breakline()
@@ -258,20 +258,18 @@ function splitwords(l, dest, n, o, w) {
addopen("-")
} else if(match(words[w],"^Ar$")) {
if(w==nwords)
- add("''file ...''" " ")
+ add("''file ...''")
else {
++w
gsub("<", "&lt;", words[w])
- add("''" words[w] "''" " ")
+ add("''" words[w] "''")
}
} else if(match(words[w],"^Cm$")) {
++w
if (displaylines == 0) {
- add("'''" words[w] "'''" " ")
+ add("'''" words[w] "'''")
} else
add(words[w])
- l = wtail()
- add(l " ")
} else if(match(words[w],"^Op$")) {
addopen("<nowiki>[</nowiki>")
option=1
@@ -342,8 +340,6 @@ function splitwords(l, dest, n, o, w) {
add(words[w])
} else if(match(words[w],"^Dv$")) {
linecmd()
- l = wtail()
- add(l " ")
} else if(match(words[w],"^Em|Ev$")) {
add(".IR")
} else if(match(words[w],"^Pq$")) {