Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #34 from ericholscher/jinhwa/bug_1011565
Browse files Browse the repository at this point in the history
bug fix: SYSTEM MESSAGE in Python API doc generation output
  • Loading branch information
bianliu1013 committed Jun 8, 2017
2 parents 003ddc4 + 360cf3f commit 92e83b5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docfx_yaml/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
from sphinx import addnodes
from sphinx.locale import admonitionlabels

class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'



class TextWrapper(textwrap.TextWrapper):
"""Custom subclass that uses a different word separator regex."""
Expand Down Expand Up @@ -998,9 +1009,7 @@ def depart_problematic(self, node):
self.add_text('<<')

def visit_system_message(self, node):
self.new_state(0)
self.add_text('<SYSTEM MESSAGE: %s>' % node.astext())
self.end_state()
print(bcolors.WARNING + "System message warnings: %s" % node.astext() + bcolors.ENDC)
raise nodes.SkipNode

def visit_comment(self, node):
Expand Down

0 comments on commit 92e83b5

Please sign in to comment.