Commit Graph

5 Commits

Author SHA1 Message Date
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:

https://docs.python.org/3/howto/unicode.html#the-string-type

> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...

Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA
c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28:51 +09:00
Takeshi KOMIYA
acd4d9f2ba #2902: jsdump.loads fails to load search index if keywords starts with underscore 2016-08-27 15:28:36 +09:00
Takeshi KOMIYA
52f4c07202 Add tests for sphinx.util.jsdump:loads() 2016-08-27 14:20:08 +09:00
Silvio Tomatis
45473b3334 Make javascript search work in more contexts
The meaning of `\w` changed from python 2 to python 3.

> $ python3.5 -c "import re; print(re.compile(r'[a-zA-Z]\w*$').match(u'a\xe8'));"
> <_sre.SRE_Match object; span=(0, 2), match='aè'>

> python -c "import re; print(re.compile(r'[a-zA-Z]\w*$').match(u'a\xe8'));"
> None

but the definition of what's an acceptable javascript identifier should not vary from case to case.
2016-07-08 15:27:48 +02:00