You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a quarto document where I would like the spaces to be preserved in the entire document. Based on this stackoverflow answer, I have a created a simple preprocessor which replaces two consecutive spaces with one space and a no-break space, in all *.qmd files, thus solving the problem.
How can I use the output from the preprocessor as the input to quarto render when working in a quarto project? I would like to keep the original files untouched and keep the intermediate files hidden from the user.
Here is the workflow in a bit more detail:
# the following line replaces occurrences of two normal spaces (U+0020) # with a normal space and a no-break space (U+00A0) in all *.qmd files# and saves the outputs to *-2.qmdfordin*.qmd;do sed $'s/\u0020\u0020/\u0020\u00a0/g'"$d">${d%%.*}-2.qmd;done# the following line renders the project (note that each qmd file is now duplicated)
quarto render
Here are the input and output files:
input (index.qmd):
1
2
3
4
5
output in index.html (unwanted output, note the missing spaces):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a quarto document where I would like the spaces to be preserved in the entire document. Based on this stackoverflow answer, I have a created a simple preprocessor which replaces two consecutive spaces with one space and a no-break space, in all *.qmd files, thus solving the problem.
How can I use the output from the preprocessor as the input to
quarto render
when working in a quarto project? I would like to keep the original files untouched and keep the intermediate files hidden from the user.Here is the workflow in a bit more detail:
Here are the input and output files:
input (
index.qmd
):output in
index.html
(unwanted output, note the missing spaces):output in
index-2.html
(desired output, note the
):Beta Was this translation helpful? Give feedback.
All reactions