Commits

Jon Waltman  committed 30fc06b

Add contextual information in Texinfo system messages.

  • Participants
  • Parent commits 8a5d098

Comments (0)

Files changed (1)

File sphinx/writers/texinfo.py

         pass
 
     def visit_system_message(self, node):
-        self.add_text('\n@format\n'
-                       '---------- SYSTEM MESSAGE -----------\n')
+        self.add_text('\n\n@w{----------- System Message: %s/%s -----------} '
+                      '(%s, line %s)\n' % (
+                node.get('type', '?'),
+                node.get('level', '?'),
+                escape(node.get('source', '?')),
+                node.get('line', '?')))
     def depart_system_message(self, node):
-        self.rstrip()
-        self.add_text('\n------------------------------------\n'
-                      '@end format\n')
+        pass
 
     def visit_comment(self, node):
         for line in node.astext().splitlines():