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

Fix the rendering of markdown text between backsticks in the incidents titles #2229

Merged

Conversation

HaudinFlorence
Copy link
Contributor

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • if you are adding a new page under docs/ or community/, you have added it to the sidebar in the corresponding _sidebar.json file
  • put any other relevant information below

This PR aimed at fixing task 5 of issue #2137 mentioning that in incidents titles, the text elements between backsticks were not rendered in markdown style.

@HaudinFlorence HaudinFlorence requested a review from a team as a code owner July 17, 2024 14:43
Copy link

netlify bot commented Jul 17, 2024

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit f6eca20
🔍 Latest deploy log https://app.netlify.com/sites/conda-forge-previews/deploys/6698b39926e5d400080d7711
😎 Deploy Preview https://deploy-preview-2229--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HaudinFlorence HaudinFlorence force-pushed the render_backsticks_in_incident_titles branch from 15db936 to 8f07439 Compare July 17, 2024 14:44
@HaudinFlorence HaudinFlorence force-pushed the render_backsticks_in_incident_titles branch from b6692e1 to f6eca20 Compare July 18, 2024 06:17
@jaimergp
Copy link
Member

Thanks @HaudinFlorence. Is there a chance we can use that component to also render the plain URLs into clickable ones? i.e. #2181

@jaimergp jaimergp mentioned this pull request Jul 18, 2024
16 tasks
@HaudinFlorence
Copy link
Contributor Author

Thanks @HaudinFlorence. Is there a chance we can use that component to also render the plain URLs into clickable ones? i.e. #2181

@jaimergp I think it can be used but I am not sure how since it seems if I see correctly that Github urls are only given as simple text in issue.body and not as link.

@jaimergp
Copy link
Member

jaimergp commented Jul 18, 2024

Since we are using react-markdown and already have remark-gfm in the lockfile, we can use it as a plugin I think?

See this example from react-markdown:

import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import remarkGfm from 'remark-gfm'

const markdown = `Just a link: www.nasa.gov.`

createRoot(document.body).render(
  <Markdown remarkPlugins={[remarkGfm]}>{markdown}</Markdown>
)

@HaudinFlorence
Copy link
Contributor Author

Since we are using react-markdown and already have remark-gfm in the lockfile, we can use it as a plugin I think?

See this example from react-markdown:

import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import remarkGfm from 'remark-gfm'

const markdown = `Just a link: www.nasa.gov.`

createRoot(document.body).render(
  <Markdown remarkPlugins={[remarkGfm]}>{markdown}</Markdown>
)

Thanks for the pointer. It works. I will open a specific PR to fix issue #2181

@jaimergp jaimergp merged commit ec83a2c into conda-forge:main Jul 18, 2024
5 of 6 checks passed
@HaudinFlorence
Copy link
Contributor Author

HaudinFlorence commented Jul 18, 2024

@jaimergp I don't know how to fix the check link failing test. If you have any hint please? Thanks.

@jaimergp
Copy link
Member

We will need to either ignore link checks in anaconda.org/conda-forge or increase the timeouts, but don't worry for now.

@jaimergp
Copy link
Member

Added #2231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants