quarto-dev / quarto-dev/quarto-cli
Whitespace problems with markdown parsing.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Parsing of the markdown seems to be dependent on whitespace on ways that are not documented.
-
When using
$delimiters for LaTeX equations, if there is whitespace between the delimiter and the equation, quarto quotes the delimiters instead of rendering the equation. -
When using bulleted lists, if there is not a blank line between the end of the paragraph and the start of the list, then the bullet characters are quoted and the list is run into the paragraph.
This happens both when rendering in Quarto and when switching back and forth between the R Studio source and visual modes.
These restrictions on syntax do not appear to be documented (certainly not in the quick help from RStudio).
Steps to reproduce
---
title: "Syntax Issues"
---
Putting whitespace between the dollar sign and the equation produces problems.
This works $H \rightarrow E$
But this does not $ H \rightarrow E $
Not leaving a blank line before the item causes a problem.
* Item 1
* Item 2
But if I leave a blank line it works.
* Item 1
* Item 2
This renders as follows:
Expected behavior
I expect both examples in both cases to be the same:
-
I expect the equation to be rendered twice.
-
I expect both lists to look the same.
Actual behavior
With extra whitespace, the equation does not render. Switching from source->visual->source in R studio changes the equation to \$ H \rightarrow \$.
Without the blank line, the list is run into the same paragraph. Switching from source->visual->source produces
Not leaving a blank line before the item causes a problem. \* Item 1 \* Item 2
Your environment
- IDE RStudio 2023.0.06+421
- OS Pop_OS 22.04
Quarto check output
(base) [ralmond@cherry: ReECD]$ quarto check
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.450
Path: /opt/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.9.7 (Conda)
Path: /home/ralmond/anaconda3/bin/python
Jupyter: 4.8.1
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.1
Path: /usr/lib/R
LibPaths:
- /home/ralmond/R/x86_64-pc-linux-gnu-library/4.3
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.43.1
rmarkdown: 2.24
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are named. Reproduce the equation and list examples with Quarto, then compare the RStudio source-to-visual-to-source round trip; done means both whitespace variants render and round-trip consistently, or their syntax requirements are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, markdown
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100