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

Reference style links do not load in Text Panel Markdown tables for Grafana 8.3.2 #44184

Closed
ChristopherzwTan opened this issue Jan 18, 2022 · 3 comments

Comments

@ChristopherzwTan
Copy link

ChristopherzwTan commented Jan 18, 2022

What happened:
After upgrading from Grafana 8.2.6 to 8.3.2. The text panel with table markdown are unable to parse reference type links.

What you expected to happen:
Reference style links should still load in a markdown table.

How to reproduce it (as minimally and precisely as possible):

  1. On Grafana 8.3.2. Create a text panel with a table
  2. Use reference style links in the table
  3. Reference style links in the table won't work, but outside of table it will

Anything else we need to know?:
Issue still occurs on Grafana v8.3.4.

Environment:

  • Grafana version:
    8.3.2

  • Data source type & version:
    N/A

  • OS Grafana is installed on:
    Grafana docker container

  • User OS & Browser:
    Mac OS - Big SUR Version 11.4
    Google Chrome - Version 94.0.4606.81 (Official Build) (x86_64)

  • Grafana plugins:
    Text panel

  • Others:
    Sample markdown used:

Testing

---

[Outside table][test link]

|Title                   |Code    |Column             |More           |Stuff          |Prod            |
|------------------------|--------|-------------------|---------------|---------------|----------------|
|Table test              |-       |-                  |-              |-              |[Inside table][test link]|

---

[test link]: https://www.google.ca

v8.2.6
v8 2 6 Markdown Table

v8.3.4
v8 3 4 MarkDown Table

@ashharrison90
Copy link
Contributor

hi @ChristopherzwTan 👋

thanks so much for raising this!

looks like this was introduced by upgrading our version of marked to v4 here: #41328.
there is a corresponding bug raised in the marked repo here: markedjs/marked#2217

in that thread there's a workaround specified, which is to move the link above where it's referenced.
so using your example, this renders correctly:

Testing

---

[Outside table][test link]

[test link]: https://www.google.ca

|Title                   |Code    |Column             |More           |Stuff          |Prod            |
|------------------------|--------|-------------------|---------------|---------------|----------------|
|Table test              |-       |-                  |-              |-              |[Inside table][test link]|

---

that may or may not be a feasible temporary solution for you?

unfortunately we can't really pin back to the old version of marked as the newer versions contain security updates which are more important. next step will be to investigate whether we can contribute a fix back to the marked repo. no promises with that, obviously. 😅

in the mean time, i think the best thing anyone can do that is affected by this would be to add 👍 to the linked marked issue. 🙂

@ChristopherzwTan
Copy link
Author

Hey @ashharrison90 👋

Yes, that workaround will work. If anything, I'm glad that reference style links still work.

Thanks for being so prompt and detailed with the response! :)

@ashharrison90
Copy link
Contributor

ok quick update - had a play around with marked yesterday to try and find the source of the problem. have added some findings to that issues here.

unfortunately i think i'm at the limit of my knowledge in that project. given there's a workaround and there's not much else we can do until there's a fix in marked, i'm gonna close this. i'll keep an eye on the marked issue and bump our version as soon as a fix is released there. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants