From 98d148ee687fc47769e938cadbea4c4bc9312cdf Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Fri, 14 Nov 2014 09:49:37 -0500 Subject: fix display of short names & filenames on Formatters page --- pygments/sphinxext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygments/sphinxext.py b/pygments/sphinxext.py index 82bc6543..85a434ad 100644 --- a/pygments/sphinxext.py +++ b/pygments/sphinxext.py @@ -133,8 +133,8 @@ class PygmentsDoc(Directive): if isinstance(docstring, bytes): docstring = docstring.decode('utf8') heading = cls.__name__ - out.append(FMTERDOC % (heading, ', '.join(data[1]) or 'None', - ', '.join(data[2]).replace('*', '\\*') or 'None', + out.append(FMTERDOC % (heading, ', '.join(data[2]) or 'None', + ', '.join(data[3]).replace('*', '\\*') or 'None', docstring)) return ''.join(out) -- cgit v1.2.1 From d92befa4604a46a99eac39b276ad14d161282de9 Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Fri, 14 Nov 2014 09:51:30 -0500 Subject: spelling/grammar/syntax fixes for docs --- doc/docs/filterdevelopment.rst | 2 +- doc/docs/java.rst | 14 +++++++------- doc/docs/lexerdevelopment.rst | 8 ++++---- doc/docs/lexers.rst | 2 +- doc/docs/tokens.rst | 4 ++-- doc/docs/unicode.rst | 2 +- doc/languages.rst | 7 ++++--- pygments/lexers/console.py | 2 +- pygments/lexers/dotnet.py | 4 ++-- pygments/lexers/javascript.py | 2 +- pygments/lexers/templates.py | 8 ++++---- 11 files changed, 28 insertions(+), 27 deletions(-) diff --git a/doc/docs/filterdevelopment.rst b/doc/docs/filterdevelopment.rst index bc399a6f..5f9ca8c7 100644 --- a/doc/docs/filterdevelopment.rst +++ b/doc/docs/filterdevelopment.rst @@ -8,7 +8,7 @@ Write your own filter Writing own filters is very easy. All you have to do is to subclass the `Filter` class and override the `filter` method. Additionally a -filter is instanciated with some keyword arguments you can use to +filter is instantiated with some keyword arguments you can use to adjust the behavior of your filter. diff --git a/doc/docs/java.rst b/doc/docs/java.rst index 5eb6196a..f553463c 100644 --- a/doc/docs/java.rst +++ b/doc/docs/java.rst @@ -2,18 +2,18 @@ Use Pygments in Java ===================== -Thanks to `Jython `__ it is possible to use Pygments in +Thanks to `Jython `_ it is possible to use Pygments in Java. -This page is a simple tutorial to get an idea of how this is working. You can -then look at the `Jython documentation `__ for more -advanced use. +This page is a simple tutorial to get an idea of how this works. You can +then look at the `Jython documentation `_ for more +advanced uses. Since version 1.5, Pygments is deployed on `Maven Central -`__ as a JAR so is Jython -which makes it a lot easier to create the Java project. +`_ as a JAR, as is Jython +which makes it a lot easier to create a Java project. -Here is an example of a `Maven `__ ``pom.xml`` file for a +Here is an example of a `Maven `_ ``pom.xml`` file for a project running Pygments: .. sourcecode:: xml diff --git a/doc/docs/lexerdevelopment.rst b/doc/docs/lexerdevelopment.rst index 23bcb4f7..08069889 100644 --- a/doc/docs/lexerdevelopment.rst +++ b/doc/docs/lexerdevelopment.rst @@ -88,10 +88,10 @@ one. Adding and testing a new lexer ============================== -To make pygments aware of your new lexer, you have to perform the following +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: +First, change to the current directory containing the Pygments source code: .. code-block:: console @@ -123,7 +123,7 @@ Now you can use pygmentize to render your example to HTML: $ ./pygmentize -O full -f html -o /tmp/example.html tests/examplefiles/example.diff -Note that this explicitely calls the ``pygmentize`` in the current directory +Note that this explicitly calls the ``pygmentize`` in the current directory by preceding it with ``./``. This ensures your modifications are used. Otherwise a possibly already installed, unmodified version without your new lexer would have been called from the system search path (``$PATH``). @@ -239,7 +239,7 @@ output stream marked as `Comment.Multiline` and continues lexing with the rules defined in the ``'comment'`` state. If there wasn't an asterisk after the slash, the `RegexLexer` checks if it's a -singleline comment (i.e. followed by a second slash). If this also wasn't the +Singleline comment (i.e. followed by a second slash). If this also wasn't the case it must be a single slash, which is not a comment starter (the separate regex for a single slash must also be given, else the slash would be marked as an error token). diff --git a/doc/docs/lexers.rst b/doc/docs/lexers.rst index fefc940e..9262efb0 100644 --- a/doc/docs/lexers.rst +++ b/doc/docs/lexers.rst @@ -31,7 +31,7 @@ Currently, **all lexers** support these options: If this option is set to ``"guess"``, a simple UTF-8 vs. Latin-1 detection is used, if it is set to ``"chardet"``, the - `chardet library `__ is used to + `chardet library `_ is used to guess the encoding of the input. .. versionadded:: 0.6 diff --git a/doc/docs/tokens.rst b/doc/docs/tokens.rst index 9193d5f4..194eb70f 100644 --- a/doc/docs/tokens.rst +++ b/doc/docs/tokens.rst @@ -89,7 +89,7 @@ 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 overloaded `in` operator was newly introduced in Pygments 0.7, the function still exists for backwards -compatiblity.) +compatibility.) 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): @@ -160,7 +160,7 @@ Name Tokens other languages constants are uppercase by definition (Ruby). `Name.Decorator` - Token type for decorators. Decorators are synatic elements in the Python + Token type for decorators. Decorators are syntactic elements in the Python language. Similar syntax elements exist in C# and Java. `Name.Entity` diff --git a/doc/docs/unicode.rst b/doc/docs/unicode.rst index 7291a3b2..17853a36 100644 --- a/doc/docs/unicode.rst +++ b/doc/docs/unicode.rst @@ -18,7 +18,7 @@ data using this encoding. You can override the encoding using the `encoding` or `inencoding` lexer options. If you have the `chardet`_ library installed and set the encoding to -``chardet`` if will ananlyse the text and use the encoding it thinks is the +``chardet`` if will analyse the text and use the encoding it thinks is the right one automatically: .. sourcecode:: python diff --git a/doc/languages.rst b/doc/languages.rst index 0f98c583..1d5c3155 100644 --- a/doc/languages.rst +++ b/doc/languages.rst @@ -27,7 +27,7 @@ Programming languages * Coq * Cryptol (incl. Literate Cryptol) * `Cython `_ -* `D `_ +* `D `_ * Dart * Delphi * Dylan @@ -45,6 +45,7 @@ Programming languages * Io * Java * JavaScript +* Lasso * LLVM * Logtalk * `Lua `_ @@ -97,8 +98,8 @@ Template languages * `Genshi `_ (the Trac template language) * JSP (Java Server Pages) * `Myghty `_ (the HTML::Mason based framework) -* `Mako `_ (the Myghty successor) -* `Smarty `_ templates (PHP templating) +* `Mako `_ (the Myghty successor) +* `Smarty `_ templates (PHP templating) * Tea Other markup diff --git a/pygments/lexers/console.py b/pygments/lexers/console.py index 56120582..c76ed648 100644 --- a/pygments/lexers/console.py +++ b/pygments/lexers/console.py @@ -18,7 +18,7 @@ __all__ = ['VCTreeStatusLexer', 'PyPyLogLexer'] class VCTreeStatusLexer(RegexLexer): """ - For colorizing output of version control status commans, like "hg + For colorizing output of version control status commands, like "hg status" or "svn status". .. versionadded:: 2.0 diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py index d24f64ea..afdb7786 100644 --- a/pygments/lexers/dotnet.py +++ b/pygments/lexers/dotnet.py @@ -497,7 +497,7 @@ class GenericAspxLexer(RegexLexer): # TODO support multiple languages within the same source file class CSharpAspxLexer(DelegatingLexer): """ - Lexer for highligting C# within ASP.NET pages. + Lexer for highlighting C# within ASP.NET pages. """ name = 'aspx-cs' @@ -518,7 +518,7 @@ class CSharpAspxLexer(DelegatingLexer): class VbNetAspxLexer(DelegatingLexer): """ - Lexer for highligting Visual Basic.net within ASP.NET pages. + Lexer for highlighting Visual Basic.net within ASP.NET pages. """ name = 'aspx-vb' diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 404bcf96..8e258f9a 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -213,7 +213,7 @@ class LiveScriptLexer(RegexLexer): .. _LiveScript: http://gkz.github.com/LiveScript/ - New in Pygments 1.6. + .. versionadded:: 1.6 """ name = 'LiveScript' diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index c153f513..b106523d 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -1122,7 +1122,7 @@ class HtmlPhpLexer(DelegatingLexer): class XmlPhpLexer(DelegatingLexer): """ - Subclass of `PhpLexer` that higlights unhandled data with the `XmlLexer`. + Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`. """ name = 'XML+PHP' @@ -1180,7 +1180,7 @@ class JavascriptPhpLexer(DelegatingLexer): class HtmlSmartyLexer(DelegatingLexer): """ - Subclass of the `SmartyLexer` that highighlights unlexed data with the + Subclass of the `SmartyLexer` that highlights unlexed data with the `HtmlLexer`. Nested Javascript and CSS is highlighted too. @@ -1263,7 +1263,7 @@ class JavascriptSmartyLexer(DelegatingLexer): class HtmlDjangoLexer(DelegatingLexer): """ - Subclass of the `DjangoLexer` that highighlights unlexed data with the + Subclass of the `DjangoLexer` that highlights unlexed data with the `HtmlLexer`. Nested Javascript and CSS is highlighted too. @@ -1851,7 +1851,7 @@ class HandlebarsHtmlLexer(DelegatingLexer): class YamlJinjaLexer(DelegatingLexer): """ - Subclass of the `DjangoLexer` that highighlights unlexed data with the + Subclass of the `DjangoLexer` that highlights unlexed data with the `YamlLexer`. Commonly used in Saltstack salt states. -- cgit v1.2.1 From 16d1f837af5ab4b9b4826854efff2b1f6685542d Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Fri, 14 Nov 2014 09:51:30 -0500 Subject: spelling/grammar/syntax fixes for docs --- doc/docs/filterdevelopment.rst | 2 +- doc/docs/java.rst | 14 +++++++------- doc/docs/lexerdevelopment.rst | 8 ++++---- doc/docs/lexers.rst | 2 +- doc/docs/tokens.rst | 4 ++-- doc/docs/unicode.rst | 2 +- doc/languages.rst | 7 ++++--- pygments/lexers/console.py | 2 +- pygments/lexers/dotnet.py | 4 ++-- pygments/lexers/javascript.py | 2 +- pygments/lexers/templates.py | 8 ++++---- 11 files changed, 28 insertions(+), 27 deletions(-) diff --git a/doc/docs/filterdevelopment.rst b/doc/docs/filterdevelopment.rst index bc399a6f..5f9ca8c7 100644 --- a/doc/docs/filterdevelopment.rst +++ b/doc/docs/filterdevelopment.rst @@ -8,7 +8,7 @@ Write your own filter Writing own filters is very easy. All you have to do is to subclass the `Filter` class and override the `filter` method. Additionally a -filter is instanciated with some keyword arguments you can use to +filter is instantiated with some keyword arguments you can use to adjust the behavior of your filter. diff --git a/doc/docs/java.rst b/doc/docs/java.rst index 5eb6196a..f553463c 100644 --- a/doc/docs/java.rst +++ b/doc/docs/java.rst @@ -2,18 +2,18 @@ Use Pygments in Java ===================== -Thanks to `Jython `__ it is possible to use Pygments in +Thanks to `Jython `_ it is possible to use Pygments in Java. -This page is a simple tutorial to get an idea of how this is working. You can -then look at the `Jython documentation `__ for more -advanced use. +This page is a simple tutorial to get an idea of how this works. You can +then look at the `Jython documentation `_ for more +advanced uses. Since version 1.5, Pygments is deployed on `Maven Central -`__ as a JAR so is Jython -which makes it a lot easier to create the Java project. +`_ as a JAR, as is Jython +which makes it a lot easier to create a Java project. -Here is an example of a `Maven `__ ``pom.xml`` file for a +Here is an example of a `Maven `_ ``pom.xml`` file for a project running Pygments: .. sourcecode:: xml diff --git a/doc/docs/lexerdevelopment.rst b/doc/docs/lexerdevelopment.rst index 23bcb4f7..08069889 100644 --- a/doc/docs/lexerdevelopment.rst +++ b/doc/docs/lexerdevelopment.rst @@ -88,10 +88,10 @@ one. Adding and testing a new lexer ============================== -To make pygments aware of your new lexer, you have to perform the following +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: +First, change to the current directory containing the Pygments source code: .. code-block:: console @@ -123,7 +123,7 @@ Now you can use pygmentize to render your example to HTML: $ ./pygmentize -O full -f html -o /tmp/example.html tests/examplefiles/example.diff -Note that this explicitely calls the ``pygmentize`` in the current directory +Note that this explicitly calls the ``pygmentize`` in the current directory by preceding it with ``./``. This ensures your modifications are used. Otherwise a possibly already installed, unmodified version without your new lexer would have been called from the system search path (``$PATH``). @@ -239,7 +239,7 @@ output stream marked as `Comment.Multiline` and continues lexing with the rules defined in the ``'comment'`` state. If there wasn't an asterisk after the slash, the `RegexLexer` checks if it's a -singleline comment (i.e. followed by a second slash). If this also wasn't the +Singleline comment (i.e. followed by a second slash). If this also wasn't the case it must be a single slash, which is not a comment starter (the separate regex for a single slash must also be given, else the slash would be marked as an error token). diff --git a/doc/docs/lexers.rst b/doc/docs/lexers.rst index fefc940e..9262efb0 100644 --- a/doc/docs/lexers.rst +++ b/doc/docs/lexers.rst @@ -31,7 +31,7 @@ Currently, **all lexers** support these options: If this option is set to ``"guess"``, a simple UTF-8 vs. Latin-1 detection is used, if it is set to ``"chardet"``, the - `chardet library `__ is used to + `chardet library `_ is used to guess the encoding of the input. .. versionadded:: 0.6 diff --git a/doc/docs/tokens.rst b/doc/docs/tokens.rst index 9193d5f4..194eb70f 100644 --- a/doc/docs/tokens.rst +++ b/doc/docs/tokens.rst @@ -89,7 +89,7 @@ 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 overloaded `in` operator was newly introduced in Pygments 0.7, the function still exists for backwards -compatiblity.) +compatibility.) 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): @@ -160,7 +160,7 @@ Name Tokens other languages constants are uppercase by definition (Ruby). `Name.Decorator` - Token type for decorators. Decorators are synatic elements in the Python + Token type for decorators. Decorators are syntactic elements in the Python language. Similar syntax elements exist in C# and Java. `Name.Entity` diff --git a/doc/docs/unicode.rst b/doc/docs/unicode.rst index 7291a3b2..17853a36 100644 --- a/doc/docs/unicode.rst +++ b/doc/docs/unicode.rst @@ -18,7 +18,7 @@ data using this encoding. You can override the encoding using the `encoding` or `inencoding` lexer options. If you have the `chardet`_ library installed and set the encoding to -``chardet`` if will ananlyse the text and use the encoding it thinks is the +``chardet`` if will analyse the text and use the encoding it thinks is the right one automatically: .. sourcecode:: python diff --git a/doc/languages.rst b/doc/languages.rst index 0f98c583..1d5c3155 100644 --- a/doc/languages.rst +++ b/doc/languages.rst @@ -27,7 +27,7 @@ Programming languages * Coq * Cryptol (incl. Literate Cryptol) * `Cython `_ -* `D `_ +* `D `_ * Dart * Delphi * Dylan @@ -45,6 +45,7 @@ Programming languages * Io * Java * JavaScript +* Lasso * LLVM * Logtalk * `Lua `_ @@ -97,8 +98,8 @@ Template languages * `Genshi `_ (the Trac template language) * JSP (Java Server Pages) * `Myghty `_ (the HTML::Mason based framework) -* `Mako `_ (the Myghty successor) -* `Smarty `_ templates (PHP templating) +* `Mako `_ (the Myghty successor) +* `Smarty `_ templates (PHP templating) * Tea Other markup diff --git a/pygments/lexers/console.py b/pygments/lexers/console.py index 56120582..c76ed648 100644 --- a/pygments/lexers/console.py +++ b/pygments/lexers/console.py @@ -18,7 +18,7 @@ __all__ = ['VCTreeStatusLexer', 'PyPyLogLexer'] class VCTreeStatusLexer(RegexLexer): """ - For colorizing output of version control status commans, like "hg + For colorizing output of version control status commands, like "hg status" or "svn status". .. versionadded:: 2.0 diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py index d24f64ea..afdb7786 100644 --- a/pygments/lexers/dotnet.py +++ b/pygments/lexers/dotnet.py @@ -497,7 +497,7 @@ class GenericAspxLexer(RegexLexer): # TODO support multiple languages within the same source file class CSharpAspxLexer(DelegatingLexer): """ - Lexer for highligting C# within ASP.NET pages. + Lexer for highlighting C# within ASP.NET pages. """ name = 'aspx-cs' @@ -518,7 +518,7 @@ class CSharpAspxLexer(DelegatingLexer): class VbNetAspxLexer(DelegatingLexer): """ - Lexer for highligting Visual Basic.net within ASP.NET pages. + Lexer for highlighting Visual Basic.net within ASP.NET pages. """ name = 'aspx-vb' diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 404bcf96..8e258f9a 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -213,7 +213,7 @@ class LiveScriptLexer(RegexLexer): .. _LiveScript: http://gkz.github.com/LiveScript/ - New in Pygments 1.6. + .. versionadded:: 1.6 """ name = 'LiveScript' diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index c153f513..b106523d 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -1122,7 +1122,7 @@ class HtmlPhpLexer(DelegatingLexer): class XmlPhpLexer(DelegatingLexer): """ - Subclass of `PhpLexer` that higlights unhandled data with the `XmlLexer`. + Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`. """ name = 'XML+PHP' @@ -1180,7 +1180,7 @@ class JavascriptPhpLexer(DelegatingLexer): class HtmlSmartyLexer(DelegatingLexer): """ - Subclass of the `SmartyLexer` that highighlights unlexed data with the + Subclass of the `SmartyLexer` that highlights unlexed data with the `HtmlLexer`. Nested Javascript and CSS is highlighted too. @@ -1263,7 +1263,7 @@ class JavascriptSmartyLexer(DelegatingLexer): class HtmlDjangoLexer(DelegatingLexer): """ - Subclass of the `DjangoLexer` that highighlights unlexed data with the + Subclass of the `DjangoLexer` that highlights unlexed data with the `HtmlLexer`. Nested Javascript and CSS is highlighted too. @@ -1851,7 +1851,7 @@ class HandlebarsHtmlLexer(DelegatingLexer): class YamlJinjaLexer(DelegatingLexer): """ - Subclass of the `DjangoLexer` that highighlights unlexed data with the + Subclass of the `DjangoLexer` that highlights unlexed data with the `YamlLexer`. Commonly used in Saltstack salt states. -- cgit v1.2.1