| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
| |
Docutils 0.21 will support Python 3.9 or later, so Python 3.7 and 3.8
will be dropped.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9337 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add "auto_encode" argument to publish_string() and
publish_programmatically() to give the user an option to select the
output type (`bytes` or `OutString`) in a way that does not interfere
with the intended encoding of the output
(the problem with the "dummy" output encoding name ``unicode``).
The default will change from ``False`` to ``True`` in Docutils 0.22
New class for `io.StringOutput`: `io.OutString` adds "encoding"
and "errors" attributes to `str`.
Allows storing the "output_encoding" and "output_encoding_error_handler"
settings in a transparent and easy to process way.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9336 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9335 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had inadvertently committed two files with Windows style 'CRLF'
(``\r\n``) line endings. This commit changes
``docutils/test/conftest.py`` and ``.gitattributes`` to use Unix
style 'LF' (``\n``) endings.
We additionally specify that Unix style line endings are only
enforced in the ``docutils`` directory, as there are around 20 files
in the sandbox that use Windows style line endings, and I don't want
to change these at the moment.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9334 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Flake8 6.0.0 introduces a stricter format for parsing ``.flake8``
files, which does not allow comments on the same line as the error
code in ``ignore`` sections. For now, update to the last version
before 6.0.0.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9331 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
When running tests in working directories other than ``docutils/test``,
the tests fail as the expected files cannot be opened from the
relative ``./data`` path. This change uses the defined ``DATA_ROOT``
constant so that the tests pass regardless of working directory. We
also take the opportunity to explicitly specify the encoding with
which to open the file, avoiding platform-dependent behaviour.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9330 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
There are standard `io` and `docutils.io`.
Avoid ambiguity by not using ``from docutils import io``.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9329 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
This setting obsoletes the positional argument <destination>.
Cf. the announcement of command line pattern changes in the
RELEASE-NOTES.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9328 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Cf. [feature-requests:#36].
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9327 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Announce target versions for imminent changes.
Announce raise of required minimal Python version to 3.9.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9326 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new functions allow the installation of `rst2*` command line scripts
via standard `entry points`__ instead of the current "scripts" list in
``setup.py`` after a transition period (cf. [feature-requests:#88]).
+ Works also for Windows.
+ Allows shorter command names (drop the extension), already in use
in Debian and Ubuntu.
__ https://packaging.python.org/en/latest/specifications/entry-points/
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9325 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Move parts of the spaghetti code in `LaTeXTranslator.depart_document()
to new auxiliary methods `LaTeXTranslator.make_title()` and
`LaTeXTranslator.append_bibliography()`.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9324 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Thanks to Alan Isaac for test and report.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9323 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
More detailled feedback when extracting data from a bibliographic field fails.
In bibliographic fields expecting a single paragraph (e.g. "author"),
restore enumerated lists originating in ambiguous markup like
"A. Einstein" (name with initial): in the given context, an we know that this
should not be an enumeration, so fixing is better than throwing an error.
Fix some cases of "ersatz" Boolean values from pre Python 2.3 times.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9322 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also restructure `test_docinfo` to reduce code duplication.
Running "transform" test modules independently failed due to an additional
INFO message:
Loading a language module results in an INFO message. Import statements
don't trigger the INFO message if the language module is already loaded.
When running a test module as __main__, the INFO message is added to the
first document using both, the language module and the `Messages` or
`TestMessages` transform. When running the test suite, the language
module may already be loaded by another test.
For stable results, the optional message must be filtered.
In "transform" tests, we do not load the default transforms, so
INFO messages are only filtered if `FilterMessages` is explicitly added.
As `FilterMessages` only acts on attached messages, it must run
*after* `TestMessages`, therefore we load it with custom priority 890.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9321 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9320 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9319 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Use "publisher" instead of "pub" in publish_* functions for
internal variables holding `core.Publisher` instances in `publish_*()`
functions.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9318 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9317 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Thanks to Alan G. Isaac for reporting the bug and proposing a patch.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9316 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Line continuation works also without parentheses inside `{}`.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9315 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let `smartquotes.py` to use `locale.getlocale` instead.
(Only used if this module is called as standalone application.)
Suppress warning in `docutils.io`:
* Don't change current behaviour without advance warning.
* The deprecated function is called inside a try-block with catchall,
so this will not lead to errors once it is removed
(if we were to keep the code until then).
Fixes [bugs:#464].
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9314 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
With UTF-8 as default encoding for Python source code and widespread
Unicode support in todays editors on all platforms,
there is no need to be more restrictive than PEP 8 any more.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9313 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the "use_bibtex" LaTeX writer setting is active (i.e. not empty),
citations are added by LaTeX/BibTeX from a database for all citation references
in the document.
The reference resolver transform now skips `citation_reference` nodes instead of
expecting matching `citation` nodes in this case.
"use_bibtex" content is now transformed to a list by the
`frontend.validate_comma_separated_list()` validator.
As BibTeX works only with "LaTeX citations", the "use_latex_citations" setting
is set to True whenever "use_bibtex" is not empty.
Update documentation.
The test function, added in the last commit, now passes.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9312 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define default test settings as class attribute.
Use separate test functions for different settings instead of
running all sub-test from one function.
Simplify naming.
Add test for "use_bibtex" setting (will be fixed in next commit).
Add stub for testing `core.publish_parts()` with the "latex" writer.
(Currently publish_parts does not work with "latex".)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9311 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9310 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use Python 3 terminology: "Unicode string" -> `str` instance.
Document "string I/O" (input/output using `str` or `bytes` instances).
Document input encoding auto-detection.
Specify the behaviour and the "explicit encoding declaration".
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9309 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
Don't mention the "nose" test framework.
(It is unmaintained, deprecated, and fails to find all test cases.)
Hint to a possible future dependency on "pytest".
Two recently added test scripts missed the executable bit.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9308 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9307 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9305 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Value `None` cannot be specified on the command line.
Use ``--input-encoding=""`` go back to Docutil's default behaviur
(use encoding indicated in the file or fallbacks)
if a config file sets "input_encoding" to another value.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9303 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
As we provide a mock Sphinx package, there is no need to emphasise
recommonmark's dependency on Sphinx.
Wrap error message. Adapt the test case.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9302 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
After basing "alltests.py" on the `unittest.defaultTestLoader`, we can (again)
skip the complete directory from the __init__.py file.
Simplify recommonmark test files (when running individually,
failing with an ImportError when recommonmark is missing is no problem).
Keep the `sys.path` setup, we still want test the local "docutils" package.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9301 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Mask trailing whitespace in test_latex2e.py.
Replace the generic extemption for '*.txt' with '*pseudoxml.txt'.
(Expected output from the "pseudoxml" writer which has trailing whitespace
by design.)
Also simplify rule after ``prest`` moved to the attic.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9300 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Add links.
Adapt to the changes during the recent refactoring.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9299 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9298 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9297 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9296 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9295 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
This allows raising the ``unittest.SkipTest`` error at the module level
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9294 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Move settings intended for both, `xetex` and `latex2e` writers
to section [latex writers].
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9293 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
(instead of ARIA role "note").
No change with "html4css1".
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9292 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
There are not only bugfix changes since 0.19, so a new "minor" release is required.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9291 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
Simplify/update instructions for installing,
Simplify/update instructions for building docs
(there is now an up-to-date docutils.conf in the "docutils root" archive path.
Update links.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9290 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9289 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
Update [buildhtml] section in docutils/docutils.conf to prune
the "docutils.egg-info" directory.
Also:
Set the writer to "html5".
Use POSIX line ends ("\\\\n").
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9288 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9287 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9286 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide example for stable command line name
(when dropping .py extension from rst2*).
Rewrite suggestions for stable HTML writer.
Styling: Docutils writer names in quotes ("")
(use the default role when referencing the `docutils.writers.<name>` sub-module,
but "<name>" when referencing a writer as, e.g., configuration settings value
or attribute value to `get_writer_by_name()`.).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9285 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9284 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|