@jwilger/pi-development-system 0.62.0 → 0.63.0
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
|
@@ -123,8 +123,9 @@ const stripTicks = (text: string): string => {
|
|
|
123
123
|
}
|
|
124
124
|
const trimmed = text.trim();
|
|
125
125
|
if (/^`+$/.test(trimmed)) return "";
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
// Only a text that is one code span is unwrapped; anything else is kept whole, ticks and all.
|
|
127
|
+
const whole = /^(`+)([^`]+)\1$/.exec(trimmed);
|
|
128
|
+
return whole?.[2]?.trim() ?? trimmed;
|
|
128
129
|
};
|
|
129
130
|
|
|
130
131
|
const stepsOf = (text: string): string[] => {
|
|
@@ -15,7 +15,7 @@ const COMMENTS = "\n## Comments\n";
|
|
|
15
15
|
/** Comment lines are quoted so nothing a comment says can look like one of our headings. */
|
|
16
16
|
const quote = (text: string): string =>
|
|
17
17
|
text
|
|
18
|
-
.replace(/\r\n
|
|
18
|
+
.replace(/\r\n?|[\u2028\u2029\u0085]/g, "\n")
|
|
19
19
|
.split("\n")
|
|
20
20
|
.map((line) => (line === "" ? ">" : `> ${line}`))
|
|
21
21
|
.join("\n");
|