bedrocklinux / bedrocklinux-website

This tracks website development for Bedrock Linux
https://bedrocklinux.org
63 stars 18 forks source link

Bad formatting with custom Markdown syntax #35

Closed aerkiaga closed 4 years ago

aerkiaga commented 4 years ago

At https://bedrocklinux.org/0.7/basic-usage.html, section "Other Cross Stratum Features", one line contains the word "Alpinex", with the formatting to that word extended all the way to the end of the line. Looking at the Markdown source, it reads:

(...) you can run both +Alpinex's package manager:

I can guess the formatting is applied by writing text in the form +<text>x. It looks like the apostrophe after the 'x' is preventing it from being interpreted as marking the end of the formatted text. Could it be that only an 'x' at the end of a word is recognized and an apostrophe is not treated as end-of-word?

paradigm commented 4 years ago

Good eye, and good analysis.

Bedrock's custom markdown is some hacked together shell script I change as needed. The relevant part of the custom markdown is just a sed substitution. ~+ expands to <span class="distro"> to colorize distro names, and ~x expands to </span> to close out custom spans. In this case, I apparently failed to type the ~ when closing out the span.

On ASCII keyboards ~ is awkward to type; I have no idea why I chose to use that to be the escape character. + is also arbitrary. There's likely better ways to go about this I might revisit in the future.

It should be fixed with today's update.