Commits

Doug Hellmann  committed 6da7f29

warn but ignore unknown node types in spelling checker

  • Participants
  • Parent commits e25667f
  • Tags spelling-0.2

Comments (0)

Files changed (3)

File spelling/README

      Supported Shells
      - "bitbucket"
 
+History
+=======
+
+0.2
+  Warn but otherwise ignore unknown node types.
+
+0.1
+  First public release.
+
 .. _PyEnchant: http://www.rfk.id.au/software/pyenchant/

File spelling/setup.py

 
 setup(
     name='sphinxcontrib-spelling',
-    version='0.1',
+    version='0.2',
     url='http://bitbucket.org/birkenfeld/sphinx-contrib',
     download_url='http://pypi.python.org/pypi/sphinxcontrib-spelling',
     license='BSD',

File spelling/sphinxcontrib/spelling.py

     def default_visit(self, node): pass
     def default_departure(self, node): pass
 
+    def unknown_visit(self, node):
+        self.document.reporter.warning('Ignoring node: %s' % node.tagname)
+    def unknown_departure(self, node): pass
+
+    # Ignore conditional "only" nodes
+    def visit_only(self, node): pass
+    def depart_only(self, node): pass
+
     # Ignore inline literal text
     def visit_literal(self, node): pass
     def depart_literal(self, node): pass