SF.net SVN: docutils:[10049 ] trunk
milde--- via Docutils-checkins <[email protected]> Sun, 09 Mar 2025 11:23:28 +0000
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 10049
http://sourceforge.net/p/docutils/code/10049
Author: milde
Date: 2025-03-09 11:23:28 +0000 (Sun, 09 Mar 2025)
Log Message:
-----------
Various small fixes.
Markup "long description" in README as "abstract".
Solve QA: ISC001 in LaTeX writer.
Fix naming of auxiliary variables in _html_base.HTMLTranslator.prepare_svg().
The "style" attribute (as one of the "image" node attributes ("atts"))
contains a list of ";"-separated style declarations.
Fixes r10024 and r10026.
Fix cross-link.
Modified Paths:
--------------
trunk/docutils/README.rst
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/web/index.rst
Modified: trunk/docutils/README.rst
===================================================================
--- trunk/docutils/README.rst 2025-03-09 02:08:38 UTC (rev 10048)
+++ trunk/docutils/README.rst 2025-03-09 11:23:28 UTC (rev 10049)
@@ -8,10 +8,10 @@
:Web site: https://docutils.sourceforge.io/
:Copyright: This document has been placed in the public domain.
-Docutils is a modular system for processing documentation
-into useful formats, such as HTML, XML, and LaTeX.
-For input Docutils supports reStructuredText, an easy-to-read,
-what-you-see-is-what-you-get plaintext markup syntax.
+:Abstract: Docutils is a modular system for processing documentation into
+ useful formats, such as HTML, XML, and LaTeX.
+ For input Docutils supports reStructuredText, an easy-to-read,
+ what-you-see-is-what-you-get plaintext markup syntax.
.. contents::
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2025-03-09 02:08:38 UTC (rev 10048)
+++ trunk/docutils/docutils/writers/_html_base.py 2025-03-09 11:23:28 UTC (rev 10049)
@@ -495,16 +495,16 @@
# Apply image node attributes:
if 'style' in atts:
# update style declarations
- clean_atts = {}
- svg_style = svg.get('style', '').split(';')
- style_atts = atts['style'].split(';')
- for att in svg_style + style_atts:
- if not att.strip():
+ declaration_dict = {}
+ svg_declarations = svg.get('style', '').split(';')
+ node_declarations = atts['style'].split(';')
+ for declaration in svg_declarations + node_declarations:
+ if not declaration.strip():
continue
- key, _, value = att.partition(':')
- clean_atts[key.strip()] = value.strip()
- style_att = ' '.join(f'{k}: {v};' for k, v in clean_atts.items())
- svg.set('style', style_att)
+ key, _, value = declaration.partition(':')
+ declaration_dict[key.strip()] = value.strip()
+ svg.set('style', ' '.join(f'{k}: {v};'
+ for k, v in declaration_dict.items()))
for dimension in ('width', 'height'):
if dimension in atts:
svg.set(dimension, atts[dimension])
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2025-03-09 02:08:38 UTC (rev 10048)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2025-03-09 11:23:28 UTC (rev 10049)
@@ -2581,13 +2581,12 @@
Corresponding rST elements: literal block, parsed-literal, code.
"""
- packages = {
- 'lstlisting': r'\usepackage{listings}' '\n' # NoQA: ISC001
- r'\lstset{xleftmargin=\leftmargin}',
- 'listing': r'\usepackage{moreverb}',
- 'Verbatim': r'\usepackage{fancyvrb}',
- 'verbatimtab': r'\usepackage{moreverb}',
- }
+ packages = {'lstlisting': '\\usepackage{listings}\n'
+ '\\lstset{xleftmargin=\\leftmargin}',
+ 'listing': r'\usepackage{moreverb}',
+ 'Verbatim': r'\usepackage{fancyvrb}',
+ 'verbatimtab': r'\usepackage{moreverb}',
+ }
literal_env = self.literal_block_env
Modified: trunk/web/index.rst
===================================================================
--- trunk/web/index.rst 2025-03-09 02:08:38 UTC (rev 10048)
+++ trunk/web/index.rst 2025-03-09 11:23:28 UTC (rev 10049)
@@ -99,7 +99,7 @@
https://docutils.sourceforge.io/docs/index.html
.. _Docutils' Subversion repository:
https://docutils.sourceforge.io/docs/dev/repository.html
-.. _requirement: https://docutils.sourceforge.io/README.html#requirements
+.. _requirement: https://docutils.sourceforge.io/README.html#dependencies
.. _release packages: https://pypi.org/project/docutils/#files
.. _PyPI: https://pypi.org
.. _release notes: https://docutils.sourceforge.io/RELEASE-NOTES.html
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.