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

Anchor links in tables don't render correctly. #1591

Closed
djotto opened this issue Nov 15, 2024 · 2 comments
Closed

Anchor links in tables don't render correctly. #1591

djotto opened this issue Nov 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@djotto
Copy link

djotto commented Nov 15, 2024

Describe the bug

An anchor link with a space in it, inside a table, is rendered as #foo%20bar not #foo-bar.

In addition, anchors inside a table without display text don't render at all.

To Reproduce

The following markdown:

| [[#Yan tan|Yan tan]] | Foo |
| -------------------- | --- |
| [[#Tether mether]]   | Bar |

* [[#Yan tan|Yan tan]]
* [[#Tether mether]]

### Yan tan

Lorem

### Tether mether

Ipsum

Produces the following HTML (svg tags stripped):

<div class="table-container">
  <table>
    <thead>
      <tr>
        <th><a href="#Yan%20tan" class="internal alias">Yan tan</a></th>
        <th>Foo</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a href="#Tether%20mether" class="internal alias"></a></td>
        <td>Bar</td>
      </tr>
    </tbody>
  </table>
</div>
<ul>
  <li><a href="#yan-tan" class="internal alias">Yan tan</a></li>
  <li><a href="#tether-mether" class="internal alias">Tether mether</a></li>
</ul>
<h3 id="yan-tan">Yan tan<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#yan-tan" class="internal"><svg></svg></a></h3>
<p>Lorem</p>
<h3 id="tether-mether">Tether mether<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#tether-mether" class="internal"><svg></svg></a></h3>
<p>Ipsum</p>

Expected behavior

Anchor links with spaces in tables should be treated the same as anchor links elsewhere in the page. Anchor links without display text in tables should be visible.

Desktop (please complete the following information):

  • Quartz Version: HEAD of v4
  • node Version: v22.9.0
  • npm version: 10.8.3
  • OS: Sonoma 14.7 (23H124)
  • Browser FF 132.0
@djotto djotto added the bug Something isn't working label Nov 15, 2024
@saberzero1
Copy link
Collaborator

#1559

@aarnphm
Copy link
Collaborator

aarnphm commented Nov 17, 2024

closed due to duplication of #1559

@aarnphm aarnphm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2024
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

3 participants