platformsh-docs icon indicating copy to clipboard operation
platformsh-docs copied to clipboard

Formatting repair for shortcode embedded in code blocks

Open dman-coders opened this issue 1 year ago • 0 comments

Where on docs.platform.sh should be changed?

https://docs.upsun.com/development/local/ddev.html image

What exactly should be updated?

Layout of the code sample, and the resulting copy & paste is incorrect.

UPSUN
_CLI_TOKEN

(with newline) should be UPSUN_CLI_TOKEN

Additional context

Inspection of the generated markup implies that the incorrect space is being introduced by the vendor/prefix_cli variable substitution ... but it became harder to dig into the system than that. I could only dig three levels of abstraction and redirection deep, so it's hard to know where to offer a patch.

Affected file: https://github.com/platformsh/platformsh-docs/blob/main/themes/psh-docs/layouts/shortcodes/ddev/token.md ... at least.

Note also that the formatting class for the two snippets is inconsistent, creating a different color scheme for the fragments of what should be one label.

image
<code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ddev config global --web-environment-add<span class="o">=</span>UPSUN
</span></span><span class="line"><span class="cl"><span class="nv">_CLI_TOKEN</span><span class="o">=</span><var spellcheck="false" title="Replace 'API_TOKEN' with your own data">API_TOKEN</var></span></span></code>

dman-coders avatar Jul 17 '24 06:07 dman-coders