Doug Hellmann  committed 678bed5

Include the document name in the console output for bad words. Bump version number.

  • Participants
  • Parent commits 6dbf1ad

Comments (0)

Files changed (5)

File spelling/announce.rst

- sphinxcontrib.spelling 1.2
+ sphinxcontrib.spelling 1.3
 What is sphinxcontrib.spelling?
 `sphinxcontrib.spelling`_ is a spelling checker for Sphinx_.  It uses
 PyEnchant_ to produce a report showing misspelled words.
-What's New in 1.2?
+What's New in 1.3?
-This update checks the spelling of document titles and section headers
-as well as the body of the document. It also fixes a packaging issue
-that prevented the tests from working when run directly from the sdist
-available on PyPI.
+This update changes the output format to include the document name
+with each misspelled word. It also fixes a bug processing some edge
+cases in the input parse tree.
 .. _PyEnchant:

File spelling/docs/source/

 # built documents.
 # The short X.Y version.
-version = '1.2'
+version = '1.3'
 # The full version, including alpha/beta/rc tags.
 release = version

File spelling/docs/source/history.rst

  Release History
   - Handle text nodes without parents. (#19)
+  - Include the input document name in the console output.
+  - Use the Sphinx wrapper for registering a directive.

File spelling/

-    version='1.2',
+    version='1.3',
     author='Doug Hellmann',

File spelling/sphinxcontrib/

                 # Check the text of the node.
                 for word, suggestions in self.checker.check(node.astext()):
-                    msg_parts = []
+                    msg_parts = [ docname ]
                     if lineno:
                         msg_parts.append(darkgreen('(line %3d)' % lineno))
 def setup(app):'Initializing Spelling Checker')
+    # Register the 'spelling' directive for setting parameters within a document
+    app.add_directive('spelling', SpellingDirective)
     # Report guesses about correct spelling
     app.add_config_value('spelling_show_suggestions', False, 'env')
     # Set the language for the text
     app.add_config_value('spelling_ignore_importable_modules', True, 'env')
     # Add any user-defined filter classes
     app.add_config_value('spelling_filters', [], 'env')
-    # Register the 'spelling' directive for setting parameters within a document
-    rst.directives.register_directive('spelling', SpellingDirective)