From: Adam T. <aa-...@us...> - 2022-05-31 17:20:38
|
--- ** [bugs:#449] Image has no line number with an `:alt:` attribute** **Status:** open **Created:** Tue May 31, 2022 05:20 PM UTC by Adam Turner **Last Updated:** Tue May 31, 2022 05:20 PM UTC **Owner:** nobody Reproducer: ```pycon >>> print(core.publish_doctree(".. image:: placeholder_image.jpg")[0].line) 1 >>> print(core.publish_doctree(".. image:: placeholder_image.jpg\n :alt: blah")[0].line) None ``` This is rather odd! Originally found whilst debugging a Sphinx issue. A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-05-31 18:35:26
|
> Reproducer: > ```pycon >>>> print(core.publish_doctree(".. image:: placeholder_image.jpg")[0].line) > 1 >>>> print(core.publish_doctree(".. image:: placeholder_image.jpg\n :alt: blah")[0].line) > None > ``` > This is rather odd! Originally found whilst debugging a Sphinx issue. This actually happens for all "image" and "figure" directives with attributes:: Test the best .. image:: placeholder_image.jpg .. image:: placeholder_image.jpg :name: testimage .. image:: placeholder_image.jpg :alt: blah .. image:: placeholder_image.jpg :class: spam .. image:: placeholder_image.jpg :width: 30% .. figure:: placeholder_image.jpg .. figure:: placeholder_image.jpg :align: right conversion with `rst2pseudoxml --expose-internal-attribute=line` also reveals that the line info in <image> and <figure> elements without attributes is off by one. --- ** [bugs:#449] Image has no line number with an `:alt:` attribute** **Status:** open **Created:** Tue May 31, 2022 05:20 PM UTC by Adam Turner **Last Updated:** Tue May 31, 2022 05:20 PM UTC **Owner:** nobody Reproducer: ```pycon >>> print(core.publish_doctree(".. image:: placeholder_image.jpg")[0].line) 1 >>> print(core.publish_doctree(".. image:: placeholder_image.jpg\n :alt: blah")[0].line) None ``` This is rather odd! Originally found whilst debugging a Sphinx issue. A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Adam T. <aa-...@us...> - 2022-06-01 21:27:40
|
I'm looking into line numbering anyway, so hopefully I might be able to fix both issues at once. A --- ** [bugs:#449] Image has no line number with an `:alt:` attribute** **Status:** open **Created:** Tue May 31, 2022 05:20 PM UTC by Adam Turner **Last Updated:** Tue May 31, 2022 05:20 PM UTC **Owner:** nobody Reproducer: ```pycon >>> print(core.publish_doctree(".. image:: placeholder_image.jpg")[0].line) 1 >>> print(core.publish_doctree(".. image:: placeholder_image.jpg\n :alt: blah")[0].line) None ``` This is rather odd! Originally found whilst debugging a Sphinx issue. A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-06-01 21:41:27
|
- **Comment**: One more instance of [feature-requests:#41]. --- ** [bugs:#449] Image has no line number with an `:alt:` attribute** **Status:** open **Created:** Tue May 31, 2022 05:20 PM UTC by Adam Turner **Last Updated:** Wed Jun 01, 2022 09:27 PM UTC **Owner:** nobody Reproducer: ```pycon >>> print(core.publish_doctree(".. image:: placeholder_image.jpg")[0].line) 1 >>> print(core.publish_doctree(".. image:: placeholder_image.jpg\n :alt: blah")[0].line) None ``` This is rather odd! Originally found whilst debugging a Sphinx issue. A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-06-01 21:49:42
|
- **status**: open --> closed-duplicate --- ** [bugs:#449] Image has no line number with an `:alt:` attribute** **Status:** closed-duplicate **Created:** Tue May 31, 2022 05:20 PM UTC by Adam Turner **Last Updated:** Wed Jun 01, 2022 09:41 PM UTC **Owner:** nobody Reproducer: ```pycon >>> print(core.publish_doctree(".. image:: placeholder_image.jpg")[0].line) 1 >>> print(core.publish_doctree(".. image:: placeholder_image.jpg\n :alt: blah")[0].line) None ``` This is rather odd! Originally found whilst debugging a Sphinx issue. A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |