| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9390 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9388 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Work around non-standard error message from pypy 3.9.
Fixes [bugs:#471].
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9384 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9378 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9376 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9374 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9372 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
We need a review of the "string output" interface and a consensus
on the "clean" end-state before starting with the implementation.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9369 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new generic part "errors" returned by default
contains the `output_encoding_error_handler` setting,
which may make-or-break encoding ``parts['whole']``.
Allows use of `core.publish_parts()` to get the document as `str`,
post-process it and encode with user configurated encoding and
encoding-error handler.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9368 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9367 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Do not fail for pre-release versions
(c.f. https://pygments.org/docs/changelog/).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9355 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
Pygments 2.14 contains changes in the Python lexer which break
``test_code``, ``test_code_long``, and ``test_include``.
https://pygments.org/docs/changelog/#version-2-14-0
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9354 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
| |
... instead of returning/storing an "informal string representation".
Replaces the test for the "odt" writers" with binary output in
`core.publish_programmatically()` with a generic alternative
(that also catches the case of the "null" writer instead of writing
the string "None").
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9353 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
Reword and wrap warning message for incompatible content
of the bibliographic field "author".
Adapt "frontmatter" unit test cases.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9351 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9350 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
The test for "single line paragraphs" failed for bibliographic fields followed
by an empty line.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9348 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9346 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ODF writer produces output in binary format.
Raise an exception if `publish_string()` is called with
this writer and ``auto_encode=False``.
Update documentation, add cross-links.
TODO:
In future, the ODF writer may return a "flat XML" version of the
"OpenDocument Text" document as `str`.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9345 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
publish_from_doctree() output is described as "string" and uses
`io.StringOutput` just as publish_string().
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9342 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9341 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9339 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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@9317 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
|
|
|
|
|
|
|
|
|
|
|
| |
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@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
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9283 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
with the "id" and "class" values of the list node.
Enables setting an "anchor" or a "class" value for "detail disclosure elments".
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9282 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
Up to Python 3.8, __file__ returns a relative path for the main script
specified on the command line. Use `Path.resolve()` to make it absolute before
calling `Path.parents`.
https://docs.python.org/3/whatsnew/3.9.html#other-language-changes
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9277 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
Running standard unittest on the test suite resulted in 89 ImportErrors
because ``import DocutilsTestSupport was used to set up sys.path()
but the module could not be found on the original sys.path().
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9274 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
There was a "late" import if __name__ == "__main__" which is no longer
required when importing `unittest` at the top.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9269 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|