|
From: <mi...@us...> - 2021-10-15 16:03:34
|
Revision: 8854
http://sourceforge.net/p/docutils/code/8854
Author: milde
Date: 2021-10-15 16:03:31 +0000 (Fri, 15 Oct 2021)
Log Message:
-----------
Config setting image_loading: use value "link" instead of "eager".
The name "eager" is too HTML5-centric. The distinction
link/embed may be supported in future also by the ODF/ODT writer.
Modified Paths:
--------------
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2021-10-13 15:42:30 UTC (rev 8853)
+++ trunk/docutils/docs/user/config.txt 2021-10-15 16:03:31 UTC (rev 8854)
@@ -1342,15 +1342,15 @@
Suggest at which point images should be loaded.
-:embed: If the image can be read from the local file system, it is
- base64_ encoded and included as a `data URI`_.
- (In future, SVG images will be converted to inline SVG)
+:embed: If the image can be read from the local file system,
+ the image data is embedded into the HTML document.
-:eager: load image immediately when opening the HTML document (default).
+:link: Link to image in the HTML document (default).
-:lazy: Specify the `lazy loading attribute`_ to defer fetching the image.
+:lazy: Link to image. Specify the `lazy loading attribute`_ to defer
+ fetching the image.
-Default: "eager". Option: ``--image-loading``.
+Default: "link". Option: ``--image-loading``.
New in Docutils 0.18.
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2021-10-13 15:42:30 UTC (rev 8853)
+++ trunk/docutils/docutils/writers/_html_base.py 2021-10-15 16:03:31 UTC (rev 8854)
@@ -319,9 +319,9 @@
self.section_level = 0
self.initial_header_level = int(settings.initial_header_level)
# image_loading only defined for HTML5 writer
- self.image_loading = getattr(settings, 'image_loading', 'eager')
+ self.image_loading = getattr(settings, 'image_loading', 'link')
if (getattr(settings, 'embed_images', False)
- and self.image_loading == 'eager'):
+ and self.image_loading == 'link'):
self.image_loading = 'embed'
self.math_output = settings.math_output.split()
self.math_output_options = self.math_output[1:]
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2021-10-13 15:42:30 UTC (rev 8853)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2021-10-15 16:03:31 UTC (rev 8854)
@@ -93,10 +93,10 @@
['--link-images'],
{'dest': 'embed_images', 'action': 'store_false'}),
('Suggest at which point images should be loaded: '
- '"embed", "eager" (default), or "lazy".',
+ '"embed", "link" (default), or "lazy".',
['--image-loading'],
- {'choices': ('embed', 'eager', 'lazy'),
- 'default': 'eager'}),
+ {'choices': ('embed', 'link', 'lazy'),
+ 'default': 'link'}),
('Append a self-link to section headings.',
['--section-self-link'],
{'default': 0, 'action': 'store_true'}),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|