mdBook
mdBook copied to clipboard
Multi-line code blocks copied from browser have ^J (control J) instead of newlines
Problem
Multi-line code blocks copied from browser have ^J (control J) instead of newlines. This breaks the copy-pasting of multiple shell commands from docs into a terminal.
Steps
-
Create a code block like
echo a echo b -
Generate and view the site in a web browser (tested with safari and brave on mac)
-
Copy the two lines above
-
Paste into a terminal
Expected: two echo commands, that both run, printing a and b.
Actual: echo a^Jecho b is pasted, only the first echo command runs, only a is printed.
At the time of writing this can also be seen at this code block: https://hledger.org/install.html#build-in-a-source-checkout
Possible Solution(s)
No response
Notes
No response
Version
mdbook v0.4.21