The author/change controller writes in the registration: If anybody more intimately involved with ReStructuredText wants to take it over, it will be surrendered gladly. We may consider taking over as "change controller" and keep the name as text/prs.fallenstein.rst (never touch a running system), change the name to text/prs.docutils.rst (simple registration in the Personal Registration Tree), or try to register as text/rst (official registry, requires publication of an RFC)
Thanks for fixing this, I can confirm that with the latest commit it works fine (except tables lists, as you mentioned - but these are not very common, at least the ones with code blocks in them :) )! I'm using the line numbers to try to identify the exact position of the code block (including its column offset), mainly for two use-cases: 1. Being able to show more precise error locations when linting code in code blocks; 2. To be able to replace code block content's with output (extracted from running...
Small documentation updates.
Doctree documentation: Include entity definitions from ``docutils.dtd``.
Use name of custom role based on "code" as its language default.
nodes.Element.findall() now accepts also a tuple of types as condition.
Line numbers are still wrong in the nested parsing of cell content in "CSV tables". Generally, source line numbers are only intended for ease of debugging and should not be relied upon too heavily.
Line numbers are still wrong in the nested parsing of cell content in "CSV tables". Generally, the line numbers are only intended for ease of debugging and should not be relied upon too heavily.
The fix is out. Sorry for the confusion: I intended to publish 2 commits with one git svn dcommit but there was a timeout after the first :(
content_offset in directives inside grid/simple tables are off
The fix is out. Sorry for the confusion: I intended to publish 2 commits with one git svn dcommit but only the first came through.
Thanks for the test script. The attached variant was used to explore the problem and find the spot that needs to be changed. The upcoming commit [r10280] will fix the problem (and also wrong line numbers in some system messages for markup errors inside table cells.
Move LaTeX styling for "html-roles" definitions to docutils.sty.
LaTeX writer: don't write labels for implicit IDs that are not referenced.
More relaxed "include" directive.
Remove obsolete method in CSVTable directive class.
Bump version to 0.23b.dev
Fix "input_offset" in tables.
Oh sorry, I missed the part on "upcoming commit"... I thought the commit you added earlier today (r10279) already fixed the issue...
Thanks for looking into this! Unfortunately with your patch, the result of my test script seems unchanged. This change fixes the issue for me, but I'm not sure whether it is correct: --- a/docutils/docutils/parsers/rst/states.py +++ b/docutils/docutils/parsers/rst/states.py @@ -1950,7 +1950,7 @@ def build_table_row(self, rowdata, tableline): entry = nodes.entry(**attributes) row += entry if ''.join(cellblock): - self.nested_parse(cellblock, input_offset=tableline+offset, + self.nested_parse(cellblock,...
Thanks for the test script. The attached variant was used to explore the problem and find the spot that needs to be changed. The upcoming commit [r10280] will fix the problem (and also wrong line numbers in some system messages for markup errors inside table cells.
content_offset in directives inside grid/simple tables are off
Thanks for the test script. The attached variant was used to explore the problem and find the spot that needs to be changed. Commit [r10280] fixes the problem (and also wrong line numbers in some system messages for markup errors inside table cells.
content_offset in directives inside grid/simple tables are off
Thanks for the test script. The attached variant was used to explore the problem and find the spot that needs to be changed. Commit [r10279] fixes the problem (and also wrong line numbers in some system messages for markup errors inside table cells.
Add internal source and line attributes to "rubric" and "table" nodes.
I've attached a small script which shows the problem. It shows the line indicated by self.content_offset surrounded by some source lines for every code block. Like here you can see that content_offset is correct outside a table: 1 '' 2 '.. code-block:: yaml' 3 '' -> 4 ' - foo' 5 '' 6 'content_offset is off by 1:' 7 '' And here it is off by one when inside a grid table: 9 '| .. code-block:: yaml |' 10 '| |' 11 '| - foo |' -> 12 '+----------------------+' 13 '' 14 'content_offset is off by 2:' 15 ...
Thank you for the report. Could you attach your test-directive, so that I can experiment and try a fix?
content_offset in directives inside grid/simple tables are off
publish_file no longer works with "BytesIO-like" objects.
Fixed in Docutils 0.22.4. Thank you for analysis and report.
release 0.22.4
release 0.22.5b1.dev
tagging release 0.22.4
release 0.22.4
Finalise documentation of changes for 0.22.4.
Thank you for the information. According to the IANA entry, Benja Fallenstein registered the "rst" MIME type because: The registrant just happened to have need of a registered media type for it. --- https://www.iana.org/assignments/media-types/text/prs.fallenstein.rst So the actual error is not the quoted part of the FAQ answer, but ... there is no registered MIME type for reStructuredText, .... It seems that with the switch of the source file extension from ".txt" to ".rst" in August 2024 some applications...
More documentation fixes.
Suggestion: Introduce a new Doctree element <line_break> in Docutils 1.0 add "br" to docutils.dtd and document it in https://docutils.sourceforge.io/docs/ref/doctree.html add new class docutils.nodes.line_break add visit_line_break() and depart_line_break() methods to Docutils writers. New standard directive line-break. Similar to "replace", "date", and "unicode", this directive may only be used in substitution definitions, e.g. .. |br| .. line-break:: I want a line break\ |br| before this text....
Thank you for the information. According to the IANA entry, Benja Fallenstein registered the "rst" MIME type because: The registrant just happened to have need of a registered media type for it. --- https://www.iana.org/assignments/media-types/text/prs.fallenstein.rst So the actual error is not the quoted part of the FAQ answer, but ... there is no registered MIME type for reStructuredText, .... It seems that with the switch of the source file extending from ".txt" to ".rst" in August 2024 some applications...
Wrong statement in "reStructuredText Specification"
Fixed in [r10271].
FAQ says MIME type for rst is text/x-rst but its source page is served as text/prs.fallenstein.rst
Documentation update
Fix statement in rST Specification example.
See also the discussion in Sphinx issue #8709. Use case: Changelogs of "pip" and "black" use version numbers as section titles: the auto-generated IDs are not stable but may change if a new section is inserted :( Workaround: use explicit targets starting with a letter like "v25.1.1" (this is what "pip" does). This works in Sphinx. In Docutils, the "self-link" uses ids[0] which is the auto-generated one. This will be solved in Docutils 0.23.
New value "auto" for "initial_header_level" config setting.
Announce upcoming changes.
More detailled description of the restrictions on transition placement.
Proposed patch: -- a/docutils/docs/ref/rst/restructuredtext.rst +++ b/docutils/docs/ref/rst/restructuredtext.rst @@ -179,7 +179,10 @@ Here are examples of `body elements`_: - Footnotes_:: .. [1] A footnote contains body elements, consistently - indented by at least 3 spaces. + indented by at least 1 space. + + The least indented line sets the reference + indentation, so this is a nested block quote. - Citations_:: The attached patch also adds some more examples and moves the paragraph about paragraph...
Wrong statement in "reStructuredText Specification"
docutils.io.FileInput: ensure read() returns a `str`.
publish_file no longer works with "BytesIO-like" objects.
Thank you for the report. The issue is fixed in [r10267].
combining unicode chars count in grid tables
Fixed in Docutils 0.22.3.
rst2html incorrectly converts tables with Combining Diacritical Marks into HTML
Fixed in Docutils 0.22.3.
Documentation update and fixes.
Simplify `ClassAttribute` transform.
Fixes for the "responsive" CSS style sheet.
Future-proof the test for valid parents of topics or sidebars.
Problem is io.FileInput.read() It needs to be data = self.decode(self.source.read()) instead of data = self.source.read() which is bytes.
publish_file no longer works / crashes
add email
release 0.22.3
version 0.22.4b1
tagging release 0.22.3
version 0.22.3
Small edits in description of recent changes.
Relax test for valid parents of topics or sidebars.
Documentation update/fixes.
Better error message for substitution definitions.
Thank you for the contribution. Unfortunately, we cannot include the patch without a change in the Docutils specification, https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#standalone-hyperlinks, which limits the supported URI schemes to the ones listed in the Official IANA Registry of URI Schemes and the W3C's Retired Index of WWW Addressing Schemes. While I don't see a "gemini" URI scheme as a particular problematic case, adding non-registered schemes should be done with special...
Fix Unknown target name warning in roles.rst
Fixed in [r10249] (with different wording). Thanks for finding the broken link and the patch.
Documentation update/fixes.
version 0.22.3b1.dev
rst2html incorrectly converts tables with Combining Diacritical Marks into HTML
Fixed in [r10251].
combining unicode chars count in grid tables
Fixed, now also for grid tables, in [r10251].
rST parser: allow for combining characters in grid tables.
Simplify `utils.column_indices()`.
Even when adjusting the grid, the parser goes wrong. See [bugs:#512].
error installing v0.22.1 on MacOS
Fixed with release 0.22.2. Thank you for report, analysis, and testing.
Now it looks fine, thank you! https://github.com/Homebrew/homebrew-core/pull/245109
Documentation fixes.
Docutils 0.22.2 is out (without the *.swp file). @daeho-ro: Could you please try whether this solves the install problem?
release 0.22.2
version 0.22.3b1.dev
tagging release 0.22.2
version 0.22.2