elif x[0] == '-l': # -l ISOLANG set documentlanguage to ISOLANG
doclang = '; documentlanguage: ' + x[1]
-texinfo_with_menus_re = re.compile (r"^(\*) +([^:\n]+)::.*?$|^@(include|menu|end menu|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *(.+?)$|@(rglos){(.+?)}", re.M)
+texinfo_with_menus_re = re.compile (r"^(\*) +([^:\n]+)::.*?$|^@(include|menu|end menu|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *(.*?)$|@(rglos){(.+?)}", re.M)
texinfo_re = re.compile (r"^@(include|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *(.+?)$|@(rglos){(.+?)}", re.M)
g.write ('* ' + item[1] + '::\n')
elif output_file and item[4] == 'rglos':
output_file.write ('_(r"' + item[5] + '") # @rglos in ' + printedfilename + '\n')
+ elif item[2] == 'menu':
+ g.write ('@menu\n')
+ elif item[2] == 'end menu':
+ g.write ('@end menu\n\n')
else:
g.write ('@' + item[2] + ' ' + item[3] + '\n')
if node_trigger:
g.write (n_blurb)
node_trigger = False
- if not item[2] in ('include', 'menu', 'end menu'):
+ elif item[2] == 'include':
+ includes.append (item[3])
+ else:
if output_file:
output_file.write ('# @' + item[2] + ' in ' + \
printedfilename + '\n_(r"' + item[3].strip () + '")\n')
if item[2] == 'node':
node_trigger = True
- elif item[2] == 'include':
- includes.append (item[3])
g.write (end_blurb)
g.close ()