2 # Converts variant of MediaWiki to DocBook
5 func open_section
(tag
) {
11 func close_section
() {
14 print "</"stack
[stack_i
]">"
25 if (block_state
!= "") {
26 print "</"block_state
">"
32 if (block_state
!= s
) {
55 while (match($0, "\"")) {
56 sub("\"", "\\“")
57 sub("\"", "\\”")
62 while (match($
0, "''")) {
63 sub("''", "<emphasis>")
64 sub("''", "</emphasis>")
71 open_section
("section")
72 print "<title>"$
0"</title>"
79 open_section
("section")
80 print "<title>"$
0"</title>"
87 open_section
("chapter")
88 print "<title>"$
0"</title>"
93 gsub("\\[\\[", "<ulink url=\"")
95 gsub("]]", "</ulink>")