Skip to content

resolves #234 Capture all contents when turning a literal block into a CLI prompt with substitutions

This merge request slightly adjusts the 06-copy-to-clipboard.js code so that when it detects a CLI prompt in a literal block, it handles cases where the literal block also has substitutions (such as +quotes) enabled. This is meant to resolve #234.

Using the following sample code:

.CLI prompt in a literal block
....
$ echo "Voila!"
$ echo "and again!"
....

.CLI prompt in a literal block with substitutions
[subs="+quotes"]
....
$ echo "Voila!"
$ *echo "and now in bold!"*
....

The current built output result is: Screenshot_2025-10-20_at_10.21.38_AM

With this change, the output becomes: Screenshot_2025-10-20_at_10.21.08_AM

Merge request reports

Loading