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

Hyperlinks in table headings don't have formatting #4327

Closed
5 tasks done
ajh0912 opened this issue Sep 6, 2022 · 3 comments
Closed
5 tasks done

Hyperlinks in table headings don't have formatting #4327

ajh0912 opened this issue Sep 6, 2022 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@ajh0912
Copy link

ajh0912 commented Sep 6, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Hyperlinks in the heading of a data tables (including footnotes) don't look like hyperlinks, but do function as a hyperlink.

Expected behaviour

Hyperlinks in the heading should be formatted blue in this case.
Example with MkDocs:
image

Actual behaviour

Hyperlinks (and footnotes) in the heading look like normal text (although are bolded due to being in a heading)
image

Steps to reproduce

test.md:

---
hide:
  - toc
  - navigation
---

# Test

| Method[^1] | Description[^2]                      | [This doesn't look like a link][Example Link 1] |
| ---------- | ------------------------------------ | ----------------------------------------------- |
| `GET`      | :material-check:     Fetch resource  | [This looks like a link][Example Link 1]        |
| `PUT`      | :material-check-all: Update resource |                                                 |
| `DELETE`   | :material-close:     Delete resource |                                                 |

These[^1] footnotes look like links when not used in a heading[^2] of a table

[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[^2]:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
    nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
    massa, nec semper lorem quam in massa.

[Example Link 1]: https://example.com/1

Package versions

  • Python: Python 3.9.13
  • MkDocs: mkdocs, version 1.3.0
  • Material: Version: 8.4.2+insiders.4.22.0

Configuration

site_name: Test Docs
markdown_extensions:
  - footnotes
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg

System information

  • Operating system: macOS 12.4
  • Browser: Firefox 104.0.1, Safari 15.5
@squidfunk squidfunk added the bug Issue reports a bug label Sep 6, 2022
@squidfunk
Copy link
Owner

Thanks for reporting. Interesting. So it was actually a deliberate decision to override links in table headers, as we did in 2135e34 and released in 5.2.1, but I agree that it doesn't really make sense to do so. However, digging through the issue tracker, it was introduced because of #1718, which is when the table header had another color than it has now.

For this reason, it's safe to remove, which I just did in 43ea033.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Sep 6, 2022
@ajh0912
Copy link
Author

ajh0912 commented Sep 6, 2022

Brilliant, thanks for the quick change.

Can confirm that hyperlinks and footnotes look like they should with the latest version:
image

Thanks @squidfunk!

@ajh0912 ajh0912 closed this as completed Sep 6, 2022
@squidfunk
Copy link
Owner

Released as part of 8.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants