Commits

Thomas Aglassinger committed 007ccf7

* Fixed broken sourcode directives.
* Cleaned up typos and wording.

Comments (0)

Files changed (1)

docs/src/lexerdevelopment.txt

 1.
 
 
-Adding and testing your lexer
-=============================
+Adding and testing a new lexer
+==============================
 
 To make pygments aware of your new lexer, you have to perform the following
 steps:
 
 First, change to the current directory containing the pygments source code:
 
-.. sourcecode::
+.. sourcecode:: console
 
     $ cd .../pygments-main
 
 Next, make sure the lexer is known from outside of the module. All modules in
-the ``pygments.lexers`` specify ``__all__``. For example, ``other.py``sets:
+the ``pygments.lexers`` specify ``__all__``. For example, ``other.py`` sets:
 
 .. sourcecode:: python
 
 Simply add the name of you lexer class to this list.
 
 Now update the ``python.lexers._mapping``. This is a generated module which
-can update itself changing the current directory to its location and simply
+can update itself by changing the current directory to its location and
 running it:
 
-.. sourcecode::
+.. sourcecode:: console
 
     $ cd pygments/lexers/
     $ python _mapping.py
 
 Without the ``cd`` command, you will get an ``ImportError``:
 
-.. sourcecode::
+.. sourcecode:: pycon
 
     ImportError: No module named ez_setup
 
 
 Now you can use pygmentize to render your example to HTML:
 
-.. sourcecode::
+.. sourcecode:: console
 
     $ ./pygmentize -O full -f html -o /tmp/example.html tests/examplefiles/example.diff
 
 
 Once the example renders as expected, you should run the complete test suite:
 
-.. sourcecode::
+.. sourcecode:: console
 
     $ python tests/run.py