| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
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
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9281 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9280 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
Use "inline-literal" for code snippets, filenames, command-line-options, and terminal output.
Use hyperlinks for configuration settings.
Use double quotes for, e.g., rST directive names and string values.
Keep formatting for changes in Docutils versions <= 0.4 (2006).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9279 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Use the default role for names of functions, classes, modules, and packages.
This reverts commit 36992b9f5b75c91b501c6c25eab10fc3d8723db8.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9278 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
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9276 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9275 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
|
| |
|
|
|
|
|
|
|
|
|
| |
Rely on `utils.relative_path()` to normalize paths. No need to use
`os.normpath()` or `os.abspath()` separately.
`utils.DependencyList.add()` accepts `pathlib.Path` instances.
Small code cleanups.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9272 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Also on Windows, the "EOT Key" (^Z) must be input on an empty line.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9271 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
Since Python 3.3 (PEP 393), all Python builds have support for the full range
of Unicode, and hence there are no longer "wide" and "narrow" builds.
Patch by Adam Turner.
Review/refactoring of ``generate_punctuation_chars.py`` including
fixup for r9253: add quote pair for Old Hungarian.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9270 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
|
| |
|
|
|
|
|
|
| |
Also, use Unicode literals for Umlauts.
Signed-off-by: milde <milde@users.sf.net>
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9268 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In rST, the location of images and figures is specified as URI
and used literally. As a consequence, finding a corresponding
image file in the local filesystem depends on the current working
directory. The tests are designed to work if the cwd is the test root.
As only files that are actually found are written to the "dependencies",
we disable the tests for image file registry if cwd != test root.
Also, use "pathlib.Path" for simpler path manipulations.
Signed-off-by: milde <milde@users.sf.net>
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9267 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
A name mismatch occured during the test refactoring which
prevented deleting a test sample requiring "pygments".
Signed-off-by: milde <milde@users.sf.net>
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9266 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean the global caches to ensure predictable test results.
(There were additional warnings for undefined directive and
role names under Windows. These were suppressed due to other
tests adding canonical names to the cache under Linux.)
Add additional warnings to the expected output samples.
Registering directives at test module level no longer works.
Move `register_directive()` call to the test function.
Signed-off-by: milde <milde@users.sf.net>
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9265 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Skipping the complete test directory does not work with "alltests.py".
Also fix running the individual tests scripts.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9264 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After test refactoring, test scripts failed with ImportError
unless started from the "test root" ``docutils/test/``.
Prepend the "docutils root" to the Python library path
so we import the local `docutils` and `test` packages,
ignoring an eventually installed Docutils package.
Set executable bit where this was missing.
Also:
Use "pathlib" instead of "os.path" for self-documenting path manipulations.
Remove duplicate ``import unittest`` statements.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9263 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
When a test fails, only the first line of the failing statement is printed.
Writing the statements that should be equal just behind the function name,
we can see which argument is the actual "output" and which is
the "expected" value if the assertment fails.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9262 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Document requirements for classes to be compatible to the Docutils I/O API.
Use PEP 257 "Docstring Conventions".
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9261 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
`Transformer.populate_from_components()` now ignores components
not inheriting `docutils.TransformSpec`.
This is a prerequisite to allow use of standard I/O classes in the Publisher.
Document the handling of `unknown_reference_resolvers`.
Use PEP 257 "Docstring Conventions".
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9260 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
transforms.txt:
Update "added by" in "Transforms Listed in Priority Order".
io.py:
reword docstrings and assertion messages,
use PEP 257 "Docstring Conventions".
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9259 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9258 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
This fixes a leftover from the times Python did not have a `bool` datatype.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9257 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Wait with warnings until a consensus is found about the future
"string/bytes" export API and stable usage patterns can be recommended.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9256 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dev/hacking:
Format example code as script rather than as console log
(enables easier use via drag-and-drop).
Hint to the "quicktest" development tool.
Add links.
user/config:
Fix legacy-lass-functions default change warning.
user/toos:
Simplify description of the generic front end.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9255 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The current algorithm checks each codepoint at least once, and when
``cp_max`` is ``None``, it checks all used characters twice. This
combines the two loops and stores the results of the call to
``unicodedata``.
Also remove the text about "wide" builds of Python, since PEP 393
and Python 3.3, all builds of Python carry support for the full
Unicode space.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9254 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unicode version 7.0 introduced U+2E42, "DOUBLE LOW-REVERSED-9 QUOTATION
MARK", in the Ps category. This codepoint doesn't have a pair
corresponding to it in the Pe category, breaking the assumptions in
the ``openers`` and ``closers`` strings. The only usages I have been
able to identify are in Old Hungarian, where the character does not
seem to have been used as a quotation mark, so the concept of an
opening character and corresponding closing character do not easily
fit. As the simplest fix to allow tests to pass following
regeneration of the ``punctuation_chars`` file without manual editing,
we remove the U+2E42 character from the Ps category.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9253 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9252 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
Update/harmonize the formatting/layout in both, the generated file
and the generating script.
Remaining differences between the current module and a re-generation result
are due to different versions of Python's `unicodedata` module.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9251 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Based on patch in opensuse.org RPM package spec.
- Change mode of files supporting use as command-line script.
- Remove "shebang line" from library modules.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9250 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Define common defaults for all functional tests in `test_functional.py`.
Only specify settings that differ from the default/fallback value
in the individual test files.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9249 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Two tests failed.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9248 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9247 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
This changes the templates to match changes made to
``punctuation_chars``, making updating the file easier. It also
changes the string wrapping algorithm, leaving less space blank on
each line.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9246 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Switch emphasis syntax (italics) to literal syntax (monospaced) for code,
methods, classes, functions, programme names, and file paths.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9245 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9244 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9243 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Store the arguments to starttag() in a class property, to allow for
different tags (HTML4 <div class="document"> and HTML5 <main>).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9242 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9241 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use utils.xml_declaration().
Don't write charset (encoding) declaration if the intended output encoding
is not known.
Copy "meta" part content into "head" in `depart_document()`
(i.e. after collecting all items).
Obsoletes auxiliary method `add_meta()`. Remove it.
Changes to the HTML output (no space character before closing tag of XML
declaration, order of metadata elements) don't affect the HTML semantics,
styling, and rendering.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9240 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Return XML text declaration.
Include an encoding declaration if the intended encoding is known.
Used in XML (and soon also in HTML) writer.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9239 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
This package is loaded by default since 2015.
The package call was removed from the other templates in Docutils 0.14.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9238 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is the minimal configuration required for the test suite to
pass using the pytest framework. This is part of the test suite
refactoring project.
- Ignore two classes that start with the word "Test"
- Provide the standard test header to pytest
- Update the documentation
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9237 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, the test suite only worked when the current working
directory was ``docutils/test/`. With this change all relative paths
are calculated explicitly such that the working directory no longer
affects the tests, meaning a less fragile test environment and
greater flexibility to use test runners other than ``alltests.py``.
This is part of the test suite refactoring project.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9236 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
API documentation:
- Spell out ampersand (&) as "and".
- Finish description of part "pepnum".
- Add links to LaTeX templates.
- Remove trailing whitespace.
Docstrings:
- Clarify source and output data type for functions using
"string I/O" (with "string" in the general sense of "`str` or `bytes`").
- Recommend using publish_parts() to get Docutils output as `str`.
- Add "()" to functions so that pydoc HTML rendering generates auto-links.
- Add links to the HTML documentation.
Tests:
- Add test for input/output data types of publish_string().
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9235 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
- Move all usages of ``testroot`` to defining and using a
``TEST_ROOT`` constant within the module, as part of the test
suite refactoring project
- Avoid ``os.chdir`` calls within ``test_error_reporting``
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9234 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Tests in ``test_include`` previously only passed when the current
working directory was equal to the test root. This change makes it
possible to run the tests without changing the CWD, as part of the
test suite refactoring project
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9233 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|