Commit Graph

152 Commits

Author SHA1 Message Date
Takeshi KOMIYA
ce3c5735cd Merge branch '2.0' 2019-06-01 01:45:47 +09:00
Takeshi KOMIYA
bd4cd571e9 Fix #4390: html: Consistent and semantic CSS for signatures 2019-05-29 00:49:13 +09:00
Takeshi KOMIYA
df05d9254d Merge branch '2.0' 2019-04-07 19:29:52 +09:00
Takeshi KOMIYA
a397610887 Fix #6263: html: HTML5Translator crashed with invalid field node 2019-04-07 18:11:02 +09:00
Takeshi KOMIYA
61098a0ae2 Drop features and APIs deprecated in 1.8 2019-03-30 14:50:37 +09:00
Takeshi KOMIYA
524ac7ff0a Fix #6096: html: Anchor links are not added to figures 2019-02-24 19:29:12 +09:00
Takeshi KOMIYA
7459d8771a Fix HTML: Invalid HTML5 file is generated for glossary (refs: #4611)
Note: It was caused by a glossary having multiple terms for one
description.
2019-01-03 18:17:17 +09:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
Jon Dufresne
1f6ce4cd44 Replace escape sequence '\u00B6' with literal '¶'
More obvious to the reader.
2018-12-20 18:39:51 -08:00
Takeshi KOMIYA
a3ab764a5b Reorder the arguments for translators 2018-12-17 23:20:01 +09:00
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
Jon Dufresne
ade973f4e3 Use Python 3 super() argument-less syntax
The form is less verbose and more idiomatic for Python 3 only code.

https://docs.python.org/3/library/functions.html#super
2018-12-15 08:35:55 -08:00
Takeshi KOMIYA
6bc357140d Replace all "unicode" type by "str" 2018-12-15 23:57:43 +09:00
Takeshi KOMIYA
9dfc5e7efe Add docutils-stubs to test deps 2018-12-15 02:42:43 +09:00
Takeshi KOMIYA
f1bf847726 Use nodes.Element for visitor/departure methods
To follow docutils-stubs rule, we use nodes.Element for
visitor/departure methods.
2018-12-15 01:39:50 +09:00
Takeshi KOMIYA
05036b9578 Remove SphinxTranslator.get_settings()
It was introduced to fake its type information and make mypy silent.
But the warnings had came from wrong typing of docutils-stubs.
(see https://github.com/tk0miya/docutils-stubs/pull/28)

After the fix, the helper method is not needed for us. So this
removes it right away.
2018-12-12 17:32:04 +09:00
Takeshi KOMIYA
4eb1a999a7 Remove HTML5Translator.should_be_compact_paragraph() (unused)
It was only copied from HTML4 translator, never used.
2018-12-12 12:29:31 +09:00
Takeshi KOMIYA
3863256cb6 Add SphinxTranslator as an abstract class 2018-12-03 22:30:56 +09:00
Takeshi KOMIYA
fd73a169c7 Fix annotations (minor fixes) 2018-12-03 01:11:06 +09:00
Takeshi KOMIYA
488d3263f3 Fix annotations for writers 2018-11-30 00:18:47 +09:00
Takeshi KOMIYA
31c4d06a22 refactor: Use super() to call methods of superclass 2018-11-28 01:58:32 +09:00
Takeshi KOMIYA
670c8a6173 Fix annotations for writers 2018-11-28 00:54:53 +09:00
Takeshi KOMIYA
3c99d00605 Add sphinx.util.typing:unicode to help mypy-3 migration 2018-11-24 23:19:51 +09:00
Jon Dufresne
b8631079bf Replace six.string_types with native str 2018-11-21 06:47:15 -08:00
Takeshi KOMIYA
a608f7e725 Update type hints to HTML5 writer 2018-11-21 01:10:25 +09:00
Jon Dufresne
710ca3d7c3 Use super() to call parent class's method 2018-11-11 13:07:12 -08:00
Takeshi KOMIYA
257394a459 Fix #5471: Show appropriate warning for deprecated APIs 2018-10-17 02:05:07 +09:00
Takeshi KOMIYA
aee5fd04d4 Fix #5348: download reference to remote file is not displayed 2018-08-26 22:25:35 +09:00
Takeshi KOMIYA
104bd42f51
Merge branch 'master' into refactor_highlighter 2018-07-29 11:21:36 +09:00
Takeshi KOMIYA
dd65d00f29 Implement math_renderer framework 2018-07-28 18:20:11 +09:00
Takeshi KOMIYA
4f296c5e67 Refactor: Run highlightlang on resolving phase 2018-07-21 13:54:09 +09:00
Takeshi KOMIYA
af4647c492 Merge branch '1.7' 2018-04-14 15:43:38 +09:00
Takeshi KOMIYA
4546c8a1b1 Fix #4817: wrong URLs on warning messages 2018-04-08 22:32:49 +09:00
Takeshi KOMIYA
2d0e2557b8
Merge branch 'master' into refactor_enumerable_nodes 2018-03-21 14:40:58 +09:00
Takeshi KOMIYA
9efaf18852 Merge branch '1.7' 2018-03-18 01:21:01 +09:00
Takeshi KOMIYA
62fa80399d Add Domain#get_enumerable_node_type() 2018-03-17 10:00:54 +09:00
Takeshi KOMIYA
70a622b86c Revert "Use typing.TYPE_CHECKING for typehints"
This reverts commit a073e17537.
2018-03-13 23:23:15 +09:00
Takeshi KOMIYA
6faef28150 Make console and warning messages translatable 2018-03-03 23:18:38 +09:00
Takeshi KOMIYA
a073e17537 Use typing.TYPE_CHECKING for typehints 2018-02-14 22:57:38 +09:00
Takeshi KOMIYA
9f5c676322 Use flake8-import-order 2018-01-28 01:52:16 +09:00
Takeshi KOMIYA
4d040abafb Fix #4079: Add notranslate class to let Google Translate know they are not translatable 2018-01-13 20:25:49 +09:00
Antoine Beaupré
90f7c7ef3f
add link to manpages in HTML builder
It is useful to have the HTML documentation builder actually link to
real rendered versions of HTML manpages in its output. That way people
can click on manpages to get the full documentation. There are a few
services offering this online, so we do not explicitly enable one by
default, but the Debian manpages repository has a lot of the manpages
pre-rendered, so it is used as an example in the documentation.

The parsing work is done by a transformer class that parses manpage
objects and extract name/section elements. Those then can be used by
writers to cross-reference to actual sites. An implementation is done
in the two HTML writers, but could also apply to ePUB/PDF writers as
well in the future.

This is not enabled by default: the `manpages_url` configuration item
needs to be enabled to point to the chosen site. The `page`, `section`
and `path` parameters are expanded through Python string formatting in
the URL on output.

Unit tests are fairly limited, but should cover most common use-cases.
2018-01-11 13:20:34 -05:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
David Lechner
831f89a687 Closes #3160: Use <kbd> tag for :kbd: role in html writers 2017-10-30 10:23:55 -05:00
Dmitry Shachnev
a9cbb42e7f Remove bulk_text_processors methods, they are no longer needed 2017-04-25 14:17:31 +03:00
Dmitry Shachnev
edc7f30b9c Remove the custom smartypants code
Instead rely on docutils’ ‘smart_quotes’ option which is available
since docutils 0.10.

This adds support for internationalization: our code supported only
English quotes, while docutils code supports 27 different languages.

Closes #498, #580, #3345, #3472.
2017-04-25 14:17:13 +03:00
Travis A. Everett
4c67c110f6 Also change depart_admonition calls for html5 builder 2017-03-04 20:32:46 -06:00
Yoshiki Shibukawa
2118e0a581 fix #1733: fix span tags for ids is in table tag (for html5 validation) 2017-03-03 11:46:19 +09:00
Yoshiki Shibukawa
0ef9ac54f1 Add experimental HTML5 writer 2017-03-02 09:56:50 +09:00