SF.net SVN: docutils:[9954 ] trunk
grubert--- via Docutils-checkins <[email protected]>
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 9954
http://sourceforge.net/p/docutils/code/9954
Author: grubert
Date: 2024-10-20 17:47:14 +0000 (Sun, 20 Oct 2024)
Log Message:
-----------
move manpage image TODO into test_writers/test_manpage
Modified Paths:
--------------
trunk/docutils/test/test_writers/test_manpage.py
trunk/sandbox/manpage-writer/TODO.rst
Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py 2024-10-20 17:44:36 UTC (rev 9953)
+++ trunk/docutils/test/test_writers/test_manpage.py 2024-10-20 17:47:14 UTC (rev 9954)
@@ -562,6 +562,58 @@
"""],
]
+# TODO check we get an INFO not a WARNING
+totest['image'] = [
+ ["""text
+.. image:: gibsnich.png
+ :alt: an image of something
+
+more text
+""",
+document_start + indend_macros + """.TH "" "" "" ""
+.SH Name
+ \\- \n\
+text
+[image: an image of something/gibsnich.png]
+.sp
+more text
+.\\" End of generated man page.
+"""],
+# TODO make alt text a quote like
+#
+# text
+#
+# an image of something
+#
+# more text
+]
+
+# TODO check we get a WARNING
+#
+# (WARNING/2) "image" not supported by "manpage" writer.
+# Please provide an "alt" attribute with textual replacement.
+#
+
+totest['image-without-alt'] = [
+ ["""text
+
+.. image:: gibsnich.png
+
+more text
+""",
+document_start + indend_macros + """.TH "" "" "" ""
+.SH Name
+ \\- \n\
+text
+[image: gibsnich.png]
+.sp
+more text
+.\\" End of generated man page.
+"""],
+# TODO there should be nothing of the image in the manpage, might be decorative
+]
+
+
if __name__ == '__main__':
unittest.main()
Modified: trunk/sandbox/manpage-writer/TODO.rst
===================================================================
--- trunk/sandbox/manpage-writer/TODO.rst 2024-10-20 17:44:36 UTC (rev 9953)
+++ trunk/sandbox/manpage-writer/TODO.rst 2024-10-20 17:47:14 UTC (rev 9954)
@@ -3,53 +3,6 @@
:Date: $Date$
-Images
-------
-
-If the image has an "alt" attribute, use its value *instead of* the filename.
-Example::
-
- text
-
- .. image:: gibsnich.png
- :alt: an image of something
-
- more text
-
-With ``rst2man foo.rst > foo.roff`` I get a ::
-
- (WARNING/2) "image" not supported
-
-and `man ./foo.roff` shows::
-
-
- () ()
-
- Name
- - text [image: an image of something/gibsnich.png]
-
- more text
-
-I would prefer an (INFO/1) instead of a warning and ::
-
- () ()
-
- Name
- text
-
- an image of something
-
- more text
-
-
-
-For images without an :alt: attribute, the warning should be kept
-but amended with something in the line of
-
- (WARNING/2) "image" not supported by "manpage" writer.
- Please provide an "alt" attribute with textual replacement.
-
-
Issues
------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.