diff options
| author | gbrandl <devnull@localhost> | 2007-01-20 18:48:39 +0100 |
|---|---|---|
| committer | gbrandl <devnull@localhost> | 2007-01-20 18:48:39 +0100 |
| commit | 01bdff3b2ae2a0cfe0f47cbd2ba731634975dabe (patch) | |
| tree | 0decd85824e1e0ae601b394c4431a2a08286aa70 /docs | |
| parent | ed188fd9f6fc0f5adaec44daca32d6bcfff5ce80 (diff) | |
| download | pygments-01bdff3b2ae2a0cfe0f47cbd2ba731634975dabe.tar.gz | |
[svn] Some minor cleanup.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/src/tokens.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/src/tokens.txt b/docs/src/tokens.txt index 22ccccea..f98b4d6e 100644 --- a/docs/src/tokens.txt +++ b/docs/src/tokens.txt @@ -81,20 +81,21 @@ of those token aliases, a number of subtypes exists (excluding the special token The `is_token_subtype()` function in the `pygments.token` module can be used to test if a token type is a subtype of another (such as `Name.Tag` and `Name`). -(This is the same as ``Name.Tag in Name``. The in operator was newly introduced -in pygments 0.7, the function still exists for backwards compatiblity) +(This is the same as ``Name.Tag in Name``. The overloaded `in` operator was newly +introduced in Pygments 0.7, the function still exists for backwards +compatiblity.) -With pygments 0.7 it's also possible to convert token from strings (for example +With Pygments 0.7, it's also possible to convert strings to token types (for example if you want to supply a token from the command line): .. sourcecode:: pycon - >>> from pygments.token import String, string_to_token - >>> string_to_token("String") + >>> from pygments.token import String, string_to_tokentype + >>> string_to_tokentype("String") Token.Literal.String - >>> string_to_token("Token.Literal.String") + >>> string_to_tokentype("Token.Literal.String") Token.Literal.String - >>> string_to_token(String) + >>> string_to_tokentype(String) Token.Literal.String |
