diff options
author | gbrandl <devnull@localhost> | 2008-05-06 19:32:52 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2008-05-06 19:32:52 +0200 |
commit | bea7b882efa3e67cf6b5e9e38fa55f15c7eb7e26 (patch) | |
tree | 7e5e8e932011ba1b2c3df3e58d636bf0eb4196ae | |
parent | 4cd7e12a7edfd1aace4d9b2455949f494df5499a (diff) | |
download | pygments-bea7b882efa3e67cf6b5e9e38fa55f15c7eb7e26.tar.gz |
Fix analyse vs analyze in the docs.
-rw-r--r-- | docs/src/api.txt | 6 | ||||
-rw-r--r-- | docs/src/quickstart.txt | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/src/api.txt b/docs/src/api.txt index 7998a7e2..b8159379 100644 --- a/docs/src/api.txt +++ b/docs/src/api.txt @@ -54,7 +54,7 @@ def `get_lexer_for_mimetype(mime, **options):` def `guess_lexer(text, **options):` Return a `Lexer` subclass instance that's guessed from the text - in `text`. For that, the `analyze_text()` method of every known + in `text`. For that, the `analyse_text()` method of every known lexer class is called with the text as argument, and the lexer which returned the highest value will be instantiated and returned. @@ -150,8 +150,8 @@ def `get_tokens_unprocessed(self, text):` This method must be overridden by subclasses. -def `analyze_text(text):` - A static method which is called for lexer guessing. It should analyze +def `analyse_text(text):` + A static method which is called for lexer guessing. It should analyse the text and return a float in the range from ``0.0`` to ``1.0``. If it returns ``0.0``, the lexer will not be selected as the most probable one, if it returns ``1.0``, it will be selected immediately. diff --git a/docs/src/quickstart.txt b/docs/src/quickstart.txt index b3f73ae5..ea9166bb 100644 --- a/docs/src/quickstart.txt +++ b/docs/src/quickstart.txt @@ -153,7 +153,7 @@ or some template tags), use these functions: >>> guess_lexer_for_filename('test.py', 'print "Hello World!"') <pygments.lexers.PythonLexer> -`guess_lexer()` passes the given content to the lexer classes' `analyze_text()` +`guess_lexer()` passes the given content to the lexer classes' `analyse_text()` method and returns the one for which it returns the highest number. All lexers have two different filename pattern lists: the primary and the |