restbuilder-0.3/ 0000755 0001750 0001750 00000000000 14016722131 013555 5 ustar carsten carsten restbuilder-0.3/CONTRIBUTORS.txt 0000644 0001750 0001750 00000000246 14016722131 016255 0 ustar carsten carsten Freek Dijkstra (macfreek)
G. Nicholas d'Andrea (gnidan)
Jeffrey Lo (jeffrey_lo)
Matthew Planchard (mplanchard)
Nicola Musatti (nmusatti)
Jack Burridge (jackburridge)
restbuilder-0.3/CHANGES.rst 0000644 0001750 0001750 00000002574 14016722131 015367 0 ustar carsten carsten Changelog
=========
restbuilder 0.3 (28 February 2021)
----------------------------------
* Now requires Sphinx 1.4 or higher (drop support for 1.0-1.3)
* Now requires Python 2.7, or Python 3.5 or higher (drop support for 3.0-3.4)
Note: Python 2.7 and 3.5 are end of life and will no longer be actively supported.
* Fix indentation for multi-line lists (Ned Batchelder)
* Fix versionadd directive for Sphinx >= 3.0 (Ned Batchelder)
* Preliminary support for tables (Jack Burridge)
* Add test suite (Jack Burridge)
* Add tox script and Github workflow to easily run tests
restbuilder 0.2 (7 June 2018)
--------------------------------
* Code moved to https://gitub.com/sphinx-contrib/restbuilder
* Python 3 compatible (Nicola Musatti)
* Adhere to rst_indent-specified indentation (Matthew Planchard)
* Fixed issue where links were converted to plaintext (Matthew Planchard)
restbuilder 0.1 (25 August 2013)
--------------------------------
* Code submitted to sphinx-contrib
https://bitbucket.org/birkenfeld/sphinx-contrib
* Released as sphinxcontrib-restbuilder
* Added basic documentation
* Unsupported/unknown tags are not printed, but send to log facility.
restbuilder (no version) (28 April 2012)
-----------------------------------------
* First release as port of a documentation generator in the NBT package
https://github.com/twoolie/NBT/commit/eefbd26c422a0e5f3c89e84fabcfb951a11722b0
restbuilder-0.3/MANIFEST.in 0000644 0001750 0001750 00000000155 14016722131 015314 0 ustar carsten carsten include README.rst
include LICENSE.txt
include CHANGES.rst
include CONTRIBUTING.rst
include CONTRIBUTORS.txt
restbuilder-0.3/setup.py 0000644 0001750 0001750 00000003354 14016722131 015274 0 ustar carsten carsten # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
Sphinx_ extension to build reST (reStructuredText_) files.
This extension is in particular useful to use in combination with the autodoc
extension to automatically generate documentation for use by any rst parser
(such as the GitHub wiki).
In itself, the extension is fairly straightforward -- it takes the parsed reST
file from Sphinx_ and outputs it as reST.
.. _Sphinx: http://sphinx-doc.org/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
'''
requires = ['Sphinx>=1.4']
setup(
name='sphinxcontrib-restbuilder',
version='0.3',
url='https://github.com/sphinx-contrib/restbuilder',
download_url='http://pypi.python.org/pypi/sphinxcontrib-restbuilder',
license='BSD 2-Clause',
author='Freek Dijkstra',
author_email='freek@macfreek.nl',
description='Sphinx extension to output reST files.',
long_description=long_desc,
zip_safe=False,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Framework :: Sphinx :: Extension',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Documentation :: Sphinx',
'Topic :: Software Development :: Documentation',
'Topic :: Text Processing :: Markup :: reStructuredText',
],
platforms='any',
python_requires='>=2.7, !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
packages=find_packages(exclude=['tests']),
include_package_data=True,
install_requires=requires,
namespace_packages=['sphinxcontrib'],
)
restbuilder-0.3/tests/ 0000755 0001750 0001750 00000000000 14016722131 014717 5 ustar carsten carsten restbuilder-0.3/tests/test_rst_list.py 0000644 0001750 0001750 00000002244 14016722131 020175 0 ustar carsten carsten from tests.utils import run_parse_test
import pytest
def test_bullet_list(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['bullet-list'])
def test_ordered_list(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['ordered-list'])
def test_nested_list(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['nested-list'])
def test_multiline_list(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['multiline-list'])
@pytest.mark.skip(reason="work in progress")
def test_ordered_list_properties(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['ordered-list-properties'])
@pytest.mark.skip(reason="work in progress")
def test_bullet_list_consecutive(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['bullet-list-consecutive'])
def test_definition_list(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['definition-list'])
restbuilder-0.3/tests/test_rst_hyperlinks.py 0000644 0001750 0001750 00000002106 14016722131 021407 0 ustar carsten carsten from tests.utils import run_parse_test
def test_hyperlink_targets(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['hyperlink-targets'])
def test_external_hyperlinks(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['external-hyperlinks'])
def test_internal_hyperlinks(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['internal-hyperlinks'])
def test_nonexisting_target(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['nonexistent-target'])
def test_ref(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-roles', ['ref'])
def test_cross_ref(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-roles/ref', ['index', 'doc1'])
def test_doc_role(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-roles/doc', ['index', 'doc1', 'doc2'])
restbuilder-0.3/tests/test_rst_headings.py 0000644 0001750 0001750 00000000255 14016722131 021004 0 ustar carsten carsten from tests.utils import run_parse_test
def test_headings(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['headings'])
restbuilder-0.3/tests/__init__.py 0000644 0001750 0001750 00000000000 14016722131 017016 0 ustar carsten carsten restbuilder-0.3/tests/utils.py 0000644 0001750 0001750 00000010271 14016722131 016432 0 ustar carsten carsten from os.path import join
try:
from itertools import zip_longest
except ImportError:
# Python 2.7 support.
from itertools import izip_longest as zip_longest
import io
import docutils
from docutils.frontend import OptionParser
from docutils.nodes import Text, Element, system_message
from docutils.parsers.rst import Parser
from docutils.utils import new_document
from docutils.core import publish_from_doctree
from sphinx.application import Sphinx
# sphinx.util.docutils requires Sphinx 1.5 and up.
try:
from sphinx.util.docutils import docutils_namespace
except ImportError:
# Attempt to support Sphinx 1.4 and thus the old Debian Stretch (oldstable)
from copy import copy
from contextlib import contextmanager
from docutils.parsers.rst import directives, roles
@contextmanager
def docutils_namespace():
"""Create namespace for reST parsers."""
try:
_directives = copy(directives._directives)
_roles = copy(roles._roles)
yield
finally:
directives._directives = _directives
roles._roles = _roles
def build_sphinx(src_dir, output_dir, files=None, config={}):
doctrees_dir = join(output_dir, '.doctrees')
filenames = []
force_all = True
default_config = {
'extensions': ['sphinxcontrib.restbuilder'],
'master_doc': 'index',
}
default_config.update(config)
config = default_config
if files:
force_all = False
filenames = [join(src_dir, file + '.rst') for file in files]
config['master_doc'] = files[0]
with docutils_namespace():
app = Sphinx(
src_dir,
None,
output_dir,
doctrees_dir,
'rst',
confoverrides=config,
verbosity=0,
)
app.build(force_all=force_all, filenames=filenames)
def assert_node_equal(output, expected):
assert type(output) == type(expected)
if isinstance(output, Text):
output_text = output.replace('\r\n', ' ')
output_text = output_text.replace('\n', ' ')
expected_text = expected.replace('\r\n', ' ')
expected_text = expected_text.replace('\n', ' ')
assert output_text == expected_text
elif isinstance(output, system_message):
assert len(output.children) == len(expected.children)
# Don't check specifics of system_messages (warnings)
# E.g. the line number may be off
elif isinstance(output, Element):
assert len(output.children) == len(expected.children)
assert output.attributes == expected.attributes
else:
raise AssertionError
def assert_doc_equal(output_doc, expected_doc):
"""
Can be used to compare two documents, ignoring any whitespace changes
"""
for output, expected in zip_longest(
output_doc.traverse(include_self=False), expected_doc.traverse(include_self=False)
):
assert_node_equal(output, expected)
def parse_doc(dir, file):
parser = Parser()
with io.open(join(dir, file + '.rst'), encoding='utf-8') as fh:
doc = new_document(
file,
OptionParser(
components=(docutils.parsers.rst.Parser,)
).get_default_values(),
)
parser.parse(
fh.read(),
doc,
)
return doc
def run_parse_test(src_dir, expected_dir, output_dir, subdir, files):
src_dir = join(src_dir, subdir)
expected_dir = join(expected_dir, subdir)
output_dir = join(output_dir, subdir)
build_sphinx(src_dir, output_dir, files)
for file in files:
output_doc = parse_doc(output_dir, file)
expected_doc = parse_doc(expected_dir, file)
try:
assert_doc_equal(output_doc, expected_doc)
except AssertionError:
# output XML version of doctree for easier debugging
with open(join(output_dir, file + '.output.xml'), 'wb') as fw:
fw.write(publish_from_doctree(output_doc, writer_name='xml'))
with open(join(output_dir, file + '.expected.xml'), 'wb') as fw:
fw.write(publish_from_doctree(expected_doc, writer_name='xml'))
raise
if __name__ == '__main__':
pass
restbuilder-0.3/tests/conftest.py 0000644 0001750 0001750 00000000737 14016722131 017125 0 ustar carsten carsten from os.path import dirname, realpath, join
import shutil
import pytest
@pytest.fixture
def src_dir():
return join(
dirname(realpath(__file__)), 'datasets'
)
@pytest.fixture
def expected_dir():
return join(
dirname(realpath(__file__)), 'expected'
)
@pytest.fixture(scope="session")
def output_dir():
out_dir = realpath(join(dirname(realpath(__file__)), '..', 'output'))
shutil.rmtree(out_dir, ignore_errors=True)
return out_dir
restbuilder-0.3/tests/test_rst_code_blocks.py 0000644 0001750 0001750 00000002257 14016722131 021475 0 ustar carsten carsten from tests.utils import run_parse_test
import pytest
import sphinx
@pytest.mark.skipif(sphinx.version_info < (2, 0), reason="Sphinx 1.x does not support code blocks without language")
def test_code_block(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-directives', ['code-block'])
def test_code_block_language(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-directives', ['code-block-language'])
def test_code_block_linenos(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-directives', ['code-block-linenos'])
def test_code(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'directives', ['code'])
def test_code_language(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'directives', ['code-language'])
@pytest.mark.skipif(sphinx.version_info < (2, 0), reason="Sphinx 1.x renders line numbers inline.")
def test_code_number_lines(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'directives', ['code-number-lines'])
restbuilder-0.3/tests/test_sphinx_versionmodified.py 0000644 0001750 0001750 00000000762 14016722131 023114 0 ustar carsten carsten from tests.utils import run_parse_test
def test_versionadded(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-directives', ['versionadded'])
def test_versionchanged(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-directives', ['versionchanged'])
def test_deprecated(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-directives', ['deprecated'])
restbuilder-0.3/tests/test_rst_toctree.py 0000644 0001750 0001750 00000000314 14016722131 020663 0 ustar carsten carsten from tests.utils import run_parse_test
def test_toctree(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'sphinx-directives/toctree', ['index', 'doc1', 'doc2'])
restbuilder-0.3/tests/test_rst_formatting.py 0000644 0001750 0001750 00000001722 14016722131 021374 0 ustar carsten carsten from tests.utils import run_parse_test
import pytest
import sphinx
def test_bold(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['bold'])
def test_italic(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['italic'])
def test_literal(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['literal'])
def test_subscript(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['subscript'])
def test_superscript(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['superscript'])
@pytest.mark.skipif(sphinx.version_info < (1, 6), reason="Smart quotes were introduces in Sphinx 1.6")
def test_smart_quotes(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['smart-quotes'])
restbuilder-0.3/tests/test_rst_blocks.py 0000644 0001750 0001750 00000000713 14016722131 020476 0 ustar carsten carsten from tests.utils import run_parse_test
def test_paragraph(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['paragraph'])
def test_indentation(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['indentation'])
def test_literal_block(src_dir, expected_dir, output_dir):
run_parse_test(src_dir, expected_dir, output_dir, 'common', ['literal-block'])
restbuilder-0.3/tests/datasets/ 0000755 0001750 0001750 00000000000 14016722131 016527 5 ustar carsten carsten restbuilder-0.3/tests/datasets/directives/ 0000755 0001750 0001750 00000000000 14016722131 020670 5 ustar carsten carsten restbuilder-0.3/tests/datasets/directives/code-number-lines.rst 0000644 0001750 0001750 00000000152 14016722131 024730 0 ustar carsten carsten .. code:: python
:number-lines:
def foo():
bar()
See also sphinx-directives/code-block.rst
restbuilder-0.3/tests/datasets/directives/index.rst 0000644 0001750 0001750 00000000220 14016722131 022523 0 ustar carsten carsten :orphan:
This directory contains tests of general reStructuredText directives.
See https://docutils.sourceforge.io/docs/ref/rst/directives.html restbuilder-0.3/tests/datasets/directives/code.rst 0000644 0001750 0001750 00000000121 14016722131 022326 0 ustar carsten carsten .. code::
def foo():
bar()
See also sphinx-directives/code-block.rst
restbuilder-0.3/tests/datasets/directives/code-language.rst 0000644 0001750 0001750 00000000213 14016722131 024111 0 ustar carsten carsten .. code:: python
def foo():
bar()
.. code:: c++
class Foo {
int i;
};
See also sphinx-directives/code-block.rst
restbuilder-0.3/tests/datasets/common/ 0000755 0001750 0001750 00000000000 14016722131 020017 5 ustar carsten carsten restbuilder-0.3/tests/datasets/common/bullet-list.rst 0000644 0001750 0001750 00000000102 14016722131 023002 0 ustar carsten carsten :orphan:
First list:
- one
- two
Another list:
* three
* four
restbuilder-0.3/tests/datasets/common/multiline-list.rst 0000644 0001750 0001750 00000006603 14016722131 023531 0 ustar carsten carsten :orphan:
* List with long lines.
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent at ante id
ante interdum porttitor. Cras mollis urna scelerisque, tincidunt diam sit
amet, vulputate ante. Orci varius natoque penatibus et magnis dis parturient
montes, nascetur ridiculus mus. Pellentesque habitant morbi tristique
senectus et netus et malesuada fames ac turpis egestas.
* ``Longline`` is a cute name for this sentence. Vestibulum cursus dui ut ex
consequat, sed ultrices justo accumsan. Donec pretium iaculis neque. Sed
iaculis tortor ac odio facilisis, mattis semper neque venenatis. Sed eu
neque non tellus iaculis blandit eu ac tellus. Fusce eu erat justo.
1. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
2. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
3. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
4. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
5. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
6. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
7. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
8. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
9. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
10. Mauris vel ante tellus. Suspendisse potenti. Sed dictum augue metus, sed
ullamcorper nisi suscipit eu. Ut non arcu ullamcorper, volutpat lectus
vitae, molestie odio.
* Morbi a est quis diam auctor pretium eu a quam. Integer auctor, ex pulvinar
tempor pretium, lacus erat bibendum arcu, nec aliquam dolor purus id massa.
1. Mauris risus enim, cursus quis euismod nec, elementum ut nibh. Sed
sollicitudin, lorem ut tempor bibendum, justo massa facilisis mauris, id
fringilla massa lectus eu urna.
* Donec arcu diam, egestas nec eros a, porta mattis lectus. Vestibulum
justo orci, rutrum eget metus vitae, molestie suscipit odio.
1. Morbi a est quis diam auctor pretium eu a quam. Integer auctor, ex pulvinar
tempor pretium, lacus erat bibendum arcu, nec aliquam dolor purus id massa.
* Mauris risus enim, cursus quis euismod nec, elementum ut nibh. Sed
sollicitudin, lorem ut tempor bibendum, justo massa facilisis mauris, id
fringilla massa lectus eu urna.
1. Donec arcu diam, egestas nec eros a, porta mattis lectus. Vestibulum
justo orci, rutrum eget metus vitae, molestie suscipit odio.
restbuilder-0.3/tests/datasets/common/list-table.rst 0000644 0001750 0001750 00000000160 14016722131 022606 0 ustar carsten carsten :orphan:
.. list-table::
:header-rows: 1
* - key
- value
* - 1
- 2
* - 3
- 4 restbuilder-0.3/tests/datasets/common/grid-table.rst 0000644 0001750 0001750 00000000074 14016722131 022564 0 ustar carsten carsten :orphan:
+---+---+
| a | b |
+===+===+
| c | d |
+---+---+
restbuilder-0.3/tests/datasets/common/literal-block.rst 0000644 0001750 0001750 00000000372 14016722131 023277 0 ustar carsten carsten :orphan:
Basic literal block:
::
# Some code block
for a in [5,4,3,2,1]: # this is program code, shown as-is
print(a)
print("it's...")
Partial minimized form: ::
Literal block
Fully minimized form::
Literal block
restbuilder-0.3/tests/datasets/common/headings.rst 0000644 0001750 0001750 00000000340 14016722131 022330 0 ustar carsten carsten :orphan:
Headline
========
Text immediately following.
Subheader
---------
Blank line before paragraph.
Another paragraph.
Subsubheader
____________
Subheader 2
-----------
Another Chapter
===============
End of file. restbuilder-0.3/tests/datasets/common/smart-quotes.rst 0000644 0001750 0001750 00000000724 14016722131 023220 0 ustar carsten carsten :orphan:
This is a line with a quote, isn't it?
This is a line with a smart quote, isn’t it?
This is a 'word' between single quotes.
This is a "word" between double quotes.
This is a ‘word’ between smart single quotes.
This is a “word” between smart double quotes.
A plain ellipsis …
Three dots is an ellipsis ...
Even three dots with spaces in between them . . .
Two dashes -- that makes a en-dash: –
Two dashes --- that makes a em-dash: —
restbuilder-0.3/tests/datasets/common/italic.rst 0000644 0001750 0001750 00000000033 14016722131 022012 0 ustar carsten carsten :orphan:
This is *italic*. restbuilder-0.3/tests/datasets/common/bold.rst 0000644 0001750 0001750 00000000033 14016722131 021465 0 ustar carsten carsten :orphan:
This is **bold**. restbuilder-0.3/tests/datasets/common/definition-list.rst 0000644 0001750 0001750 00000000437 14016722131 023656 0 ustar carsten carsten :orphan:
Definition lists:
what
Definition lists associate a term with
a definition.
how
The term is a one-line phrase, and the
definition is one or more paragraphs or
body elements, indented relative to the
term. Blank lines are not allowed
between term and definition. restbuilder-0.3/tests/datasets/common/ordered-list.rst 0000644 0001750 0001750 00000000176 14016722131 023152 0 ustar carsten carsten :orphan:
1. This is a numbered list.
2. It has two items too.
#. This is a continuation of the list.
#. It is numbered too.
restbuilder-0.3/tests/datasets/common/paragraph.rst 0000644 0001750 0001750 00000000771 14016722131 022523 0 ustar carsten carsten :orphan:
Single line
Two short
lines.
Lines continued \
with backslash.
Single line with multiple spaces.
A long line that goes on and on and on and on and on and really is so lang that it will be wrapped at some point. Well, at least it should really be wrapped by now, because really, this is a long sentence, eh?
A line with a very long word is abcdefghijklmoqprstuvwxyzabcdefghijklmoqprstuvwxyzabcdefghijklmoqprstuvwxyzabcdefghijklmoqprstuvwxyzabcdefghijklmoqprstuvwxyz. Long or what?
restbuilder-0.3/tests/datasets/common/bullet-list-consecutive.rst 0000644 0001750 0001750 00000000046 14016722131 025336 0 ustar carsten carsten :orphan:
- one
- two
* three
* four
restbuilder-0.3/tests/datasets/common/index.rst 0000644 0001750 0001750 00000000220 14016722131 021652 0 ustar carsten carsten :orphan:
This directory contains test of common reStructuredText markup.
See https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html restbuilder-0.3/tests/datasets/common/indentation.rst 0000644 0001750 0001750 00000000727 14016722131 023073 0 ustar carsten carsten :orphan:
Not indented
Four spaces
Single tab
Two indented lines after each other
A long line that goes on and on and on and on and on and really is so lang that it will be wrapped at some point. Well, at least it should really be wrapped by now, because really, this is a long sentence, isn’t it?
Four spaces
Eight spaces
Twelve spaces
Eight spaces
Four spaces
Indented
Not indented
Three spaces
restbuilder-0.3/tests/datasets/common/external-hyperlinks.rst 0000644 0001750 0001750 00000000640 14016722131 024561 0 ustar carsten carsten :orphan:
Embedded external hyperlinks, like `Python
`_.
Indirect external hyperlinks, like Larch_ or Python_.
`Write to me`_ with your questions.
.. _Write to me: jdoe@example.com
.. _Larch: https://en.wikipedia.org/wiki/Larch
Anonymous hyperlinks, like `the web site of my favorite programming language`__.
.. __: http://www.python.org
Direct hyperlinks, like http://www.python.org.
restbuilder-0.3/tests/datasets/common/subscript.rst 0000644 0001750 0001750 00000000044 14016722131 022565 0 ustar carsten carsten :orphan:
This is :sub:`subscript`.
restbuilder-0.3/tests/datasets/common/ordered-list-properties.rst 0000644 0001750 0001750 00000000552 14016722131 025342 0 ustar carsten carsten :orphan:
3. This is a numbered list.
4. It started with item 3.
5. Five
6. Six
7. Seven
8. Eight
9. Nine
10. Ten
11. Eleven
12. Twelve
13. Thirteen
C) Third letter of the alphabet
D) Fourth letter of the alphabet
E) Fifth letter of the alphabet
I. Roman numerals
II. Roman numerals
III. Roman numerals
IV. Roman numerals
(a) one
(b) two
(c) three
restbuilder-0.3/tests/datasets/common/internal-hyperlinks.rst 0000644 0001750 0001750 00000000630 14016722131 024552 0 ustar carsten carsten :orphan:
Clicking on this internal hyperlink will take us to the target_
below.
.. _target:
The hyperlink target above points to this paragraph.
Titles are targets, too
=======================
Implict references, even with spaces, like `Titles are
targets, too`_.
Untitled references target_ and `target`_ should be the same.
This link_ refers to a file called ``underscore_``.
.. _link: underscore\_
restbuilder-0.3/tests/datasets/common/nonexistent-target.rst 0000644 0001750 0001750 00000000054 14016722131 024412 0 ustar carsten carsten :orphan:
Pointer to a nonexisting_ target.
restbuilder-0.3/tests/datasets/common/simple-table.rst 0000644 0001750 0001750 00000000110 14016722131 023117 0 ustar carsten carsten :orphan:
== == ==
a1 a2 a3
== == ==
b1 b2 b3
c1 c2 c3
d1 d2 d3
== == == restbuilder-0.3/tests/datasets/common/nested-list.rst 0000644 0001750 0001750 00000000323 14016722131 023002 0 ustar carsten carsten :orphan:
* first item
* second item
* first sub item
* second sub item
* third sub item
* third item
* forth item
1. Item 1 initial text.
* Item 1a.
* Item 1b.
2. * Item 2a.
* Item 2b.
restbuilder-0.3/tests/datasets/common/superscript.rst 0000644 0001750 0001750 00000000046 14016722131 023134 0 ustar carsten carsten :orphan:
This is :sup:`superscript`.
restbuilder-0.3/tests/datasets/common/literal.rst 0000644 0001750 0001750 00000000036 14016722131 022204 0 ustar carsten carsten :orphan:
This is ``literal``. restbuilder-0.3/tests/datasets/common/hyperlink-targets.rst 0000644 0001750 0001750 00000001167 14016722131 024232 0 ustar carsten carsten :orphan:
.. _target:
The hyperlink target above points to this paragraph.
Internal hyperlink targets may be chained. Multiple adjacent internal hyperlink targets all point to the same element:
.. _target1:
.. _target2:
The targets target1 and target2 are synonyms; they both
point to this paragraph.
.. _one: two_
.. _two: three_
.. _three:
Indirect hyperlink targets have a hyperlink reference in their link blocks. In the following example, target one indirectly references whatever target two references, and target two references target three, an internal hyperlink target. In effect, all three reference the same thing.
restbuilder-0.3/tests/datasets/sphinx-roles/ 0000755 0001750 0001750 00000000000 14016722131 021162 5 ustar carsten carsten restbuilder-0.3/tests/datasets/sphinx-roles/ref.rst 0000644 0001750 0001750 00000000502 14016722131 022465 0 ustar carsten carsten Read more in :ref:`section-w2zn7enu`.
.. _section-w2zn7enu:
Section Title
=============
Text body.
See the examples in :ref:`section-example-1` and :ref:`section-example-2`.
.. _section-example-1:
Example
-------
First section with equal name.
.. _section-example-2:
Example
-------
Second section with equal name.
restbuilder-0.3/tests/datasets/sphinx-roles/doc/ 0000755 0001750 0001750 00000000000 14016722131 021727 5 ustar carsten carsten restbuilder-0.3/tests/datasets/sphinx-roles/doc/doc2.rst 0000644 0001750 0001750 00000000043 14016722131 023305 0 ustar carsten carsten Doc 2
=====
Jump to :doc:`doc1`.
restbuilder-0.3/tests/datasets/sphinx-roles/doc/index.rst 0000644 0001750 0001750 00000000070 14016722131 023565 0 ustar carsten carsten root
====
* :doc:`doc1`.
* :doc:`This is Doc 2 `. restbuilder-0.3/tests/datasets/sphinx-roles/doc/doc1.rst 0000644 0001750 0001750 00000000042 14016722131 023303 0 ustar carsten carsten Doc 1
=====
Jump to :doc:`doc2`.
restbuilder-0.3/tests/datasets/sphinx-roles/index.rst 0000644 0001750 0001750 00000000235 14016722131 023023 0 ustar carsten carsten :orphan:
This directory contains tests of Sphinx-specific reStructuredText roles.
See https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html restbuilder-0.3/tests/datasets/sphinx-roles/ref/ 0000755 0001750 0001750 00000000000 14016722131 021736 5 ustar carsten carsten restbuilder-0.3/tests/datasets/sphinx-roles/ref/index.rst 0000644 0001750 0001750 00000000061 14016722131 023574 0 ustar carsten carsten root
====
Read more in :ref:`section-znu5w4ex`.
restbuilder-0.3/tests/datasets/sphinx-roles/ref/doc1.rst 0000644 0001750 0001750 00000000076 14016722131 023321 0 ustar carsten carsten .. _section-znu5w4ex:
Section Title
=============
Text body.
restbuilder-0.3/tests/datasets/roles/ 0000755 0001750 0001750 00000000000 14016722131 017653 5 ustar carsten carsten restbuilder-0.3/tests/datasets/roles/index.rst 0000644 0001750 0001750 00000000206 14016722131 021512 0 ustar carsten carsten :orphan:
This directory contains tests of general reStructuredText roles.
See https://docutils.sourceforge.io/docs/ref/rst/roles.html restbuilder-0.3/tests/datasets/sphinx-directives/ 0000755 0001750 0001750 00000000000 14016722131 022177 5 ustar carsten carsten restbuilder-0.3/tests/datasets/sphinx-directives/code-block-linenos.rst 0000644 0001750 0001750 00000000136 14016722131 026400 0 ustar carsten carsten .. code-block:: python
:linenos:
def foo():
bar()
See also directives/code.rst
restbuilder-0.3/tests/datasets/sphinx-directives/versionadded.rst 0000644 0001750 0001750 00000000115 14016722131 025375 0 ustar carsten carsten .. versionadded:: 0.3.1
.. versionadded:: 1.7.0
The spam methods is new.
restbuilder-0.3/tests/datasets/sphinx-directives/code-block.rst 0000644 0001750 0001750 00000000112 14016722131 024725 0 ustar carsten carsten .. code-block::
def foo():
bar()
See also directives/code.rst
restbuilder-0.3/tests/datasets/sphinx-directives/code-block-language.rst 0000644 0001750 0001750 00000000217 14016722131 026514 0 ustar carsten carsten Some Python Code:
.. code-block:: python
def foo():
bar()
Some C++ code:
.. code-block:: c++
class Foo {
int i;
};
restbuilder-0.3/tests/datasets/sphinx-directives/toctree/ 0000755 0001750 0001750 00000000000 14016722131 023644 5 ustar carsten carsten restbuilder-0.3/tests/datasets/sphinx-directives/toctree/doc2.rst 0000644 0001750 0001750 00000000040 14016722131 025217 0 ustar carsten carsten Doc 2
=====
This is document 2. restbuilder-0.3/tests/datasets/sphinx-directives/toctree/index.rst 0000644 0001750 0001750 00000000070 14016722131 025502 0 ustar carsten carsten root
====
.. toctree::
doc1
This is Doc 2