Skip to content

Commit b25c2f4

Browse files
Merge pull request #13 from SimplrJS/dev
Version 1.0.4
2 parents 61eb9f8 + 96870ae commit b25c2f4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

__tests__/__snapshots__/markdown-generator.test.ts.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@simplrjs/markdown",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Markdown generator",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

src/markdown-generator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ export namespace MarkdownGenerator {
236236
* @see https://daringfireball.net/projects/markdown/syntax#backslash
237237
*/
238238
export function EscapeString(text: string): string {
239-
return text.replace(/[\\\`\*\_\{\}\[\]\(\)\#\+\-\.\!\|]/g, "\\$&");
239+
return text
240+
.replace(/[\\\`\*\_\{\}\[\]\(\)\#\+\-\.\!]/g, "\\$&")
241+
.replace(/\|/, "&#124");
240242
}
241243
}

0 commit comments

Comments
 (0)