@redpanda-data/docs-extensions-and-macros 5.38.4 → 5.38.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1718,7 +1718,15 @@ function formatDescription(desc, customTransformations = null, options = {}) {
|
|
|
1718
1718
|
|
|
1719
1719
|
// Merge backticked environment variables with adjacent paths
|
|
1720
1720
|
// e.g., `$HOME`/.local/bin → `$HOME/.local/bin`
|
|
1721
|
-
|
|
1721
|
+
// The continuation excludes a trailing ) . , ; : ! ? so sentence punctuation
|
|
1722
|
+
// immediately after the path (no space) lands outside the code span instead
|
|
1723
|
+
// of being swallowed into it, e.g. "...(defaults to `$HOME/.local/bin)`" or
|
|
1724
|
+
// "...saved in `$HOME/.local/bin.` This" -- both published on
|
|
1725
|
+
// rpk-plugin-install.adoc before this fix. The continuation past the slash
|
|
1726
|
+
// is optional, so a bare trailing slash ($HOME/, $PWD/ -- both real in the
|
|
1727
|
+
// rpk source) still merges into `$HOME/` instead of staying split as
|
|
1728
|
+
// `$HOME`/.
|
|
1729
|
+
result = result.replace(/`(\$[A-Z_][A-Z0-9_]*)`(\/(?:[^\s`]*[^\s`).,;:!?])?)/g, '`$1$2`')
|
|
1722
1730
|
|
|
1723
1731
|
// Add backticks around file paths (but not if already backticked)
|
|
1724
1732
|
// Must check both the slash and the path aren't already inside backticks
|