Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Image anchors #22

Open
ignapas opened this issue Jul 12, 2024 · 2 comments
Open

[BUG] Image anchors #22

ignapas opened this issue Jul 12, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ignapas
Copy link

ignapas commented Jul 12, 2024

Describe the bug

When the HTML builder gives something like

<a class="reference internal image-reference" href="../../_images/SelfInductance_Model.png">
   <img alt="../../_images/SelfInductance_Model.png" src="../../_images/SelfInductance_Model.png" style="width: 70%;" />
</a>

The markdown output only shows

<a id="selfinductancemodel"></a>

No link to the image nor ![]() markdown image code.

To Reproduce

I believe this is the RST code that generates it, although I don't know much about Sphinx template/generation code.

.. _selfinductancemodel:

.. figure:: EMLF_figures/SelfInductance_Model.png
    :align: center
    :width: 70%

    Model for A3 transmit coil.

Expected behavior

I would expect the Markdown builder to give

[![../../_images/SelfInductance_Model.png](../../_images/SelfInductance_Model.png)](../../_images/SelfInductance_Model.png)

or better yet

[<img alt="../../_images/SelfInductance_Model.png" src="../../_images/SelfInductance_Model.png" style="width: 80%;"/>](../../_images/SelfInductance_Model.png)

Environment (please complete the following information):

  • Ubuntu 20
  • Version
    • Sphinx==7.1.2
    • sphinx-markdown-builder==0.6.6

Additional context

I can provide with any extra info when requested

@ignapas ignapas added the bug Something isn't working label Jul 12, 2024
@liran-funaro
Copy link
Owner

@ignapas Thank you for the report.
I'm sorry it took so much time to reply.
Can you elaborate on why we expect a link if the RST only includes an image?

@liran-funaro
Copy link
Owner

@ignapas The tests already cover figures and it passes. Please see image-target.rst and image-target.md, and see if you can identify what is the difference between this and your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants