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

GitHub markdown alerts being escaped #10815

Closed
lucaspar opened this issue Sep 16, 2024 · 3 comments
Closed

GitHub markdown alerts being escaped #10815

lucaspar opened this issue Sep 16, 2024 · 3 comments
Labels
support a request for support

Comments

@lucaspar
Copy link

lucaspar commented Sep 16, 2024

Bug description

GitHub markdown alerts in a .qmd file seem to be escaped, causing an incorrect rendering:

> [!NOTE]
> Useful information that users should know, even when skimming content.

is transformed into the following .md:

> \[!NOTE\] Useful information that users should know, even when
> skimming content.

which causes the corresponding GitHub markdown to render incorrectly.

I'm reporting this bug more for documentation / discussion purposes. Adopting this feature could be out of scope for qmd, in which case it could be marked as e.g. wontfix.

Steps to reproduce

No response

Expected behavior

Do not escape the alert blockquote indicator, i.e.:

> [!NOTE]
> Useful information that users should know, even when
> skimming content.

Actual behavior

No response

Your environment

No response

Quarto check output

Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.57
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.3
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
@lucaspar lucaspar added the bug Something isn't working label Sep 16, 2024
@cderv
Copy link
Collaborator

cderv commented Sep 16, 2024

The GFM syntax is not valid in a .qmd source which follows Pandoc's Markdown syntax and some of its variant.

When you need to use raw output content in source, you should use raw blocks, like when including html for HTML output or latex markup for pdf output. See https://quarto.org/docs/authoring/markdown-basics.html#raw-content

```{=gfm}
> [!NOTE]
> Useful information that users should know, even when skimming content.
```

You could also just use Quarto callout syntax which will output the right markup when using format: gfm

---
format: gfm
---

::: {.callout-note}
Useful information that users should know, even when skimming content.
:::

This is available since Quarto 1.4

Hope this helps

@mcanouil
Copy link
Collaborator

mcanouil commented Sep 16, 2024

This has already been discussed and is part of the GFM target (#6935).
Quarto uses a more broad implementation.

---
title: "Quarto Playground"
format: gfm
---

::: {.callout-caution}
This is a caution callout
:::

which will produce:

# Quarto Playground


> [!CAUTION]
>
> This is a caution callout

@mcanouil mcanouil added support a request for support and removed bug Something isn't working labels Sep 16, 2024
@lucaspar
Copy link
Author

@cderv that is certainly helpful, thanks for pointing out the raw content mode.

@mcanouil mcanouil closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support a request for support
Projects
None yet
Development

No branches or pull requests

3 participants