@tinymce/moxiedoc
Advanced tools
Comparing version 0.2.0-feature.20220218064439220.shaf70ec27 to 0.2.0-feature.20220309231308599.sha3b8dd7a
@@ -46,5 +46,7 @@ "use strict"; | ||
}; | ||
// convert content that looks like asciidoc attributes (e.g {0}) to literal strings | ||
const escapeAttributes = (str) => str.replace(/(\{\s*[\w\d-]+\s*\})/g, '+$1+'); | ||
// runs a bunch of required cleanup filters, where embedded code/text can break asciidoc rendering | ||
const cleanup = (str) => { | ||
const filters = [escapeComments, encodeBR, encodeEM, encodeStrong, encodeLinks, encodeCode]; | ||
const filters = [escapeComments, encodeBR, encodeEM, encodeStrong, encodeLinks, encodeCode, escapeAttributes]; | ||
return filters.reduce((acc, filter) => filter(acc), str); | ||
@@ -51,0 +53,0 @@ }; |
{ | ||
"name": "@tinymce/moxiedoc", | ||
"version": "0.2.0-feature.20220218064439220.shaf70ec27", | ||
"version": "0.2.0-feature.20220309231308599.sha3b8dd7a", | ||
"description": "A tool for generating API documentation", | ||
@@ -5,0 +5,0 @@ "author": "Tiny Technologies, Inc", |
@@ -61,5 +61,9 @@ import { Return } from '../../lib/member'; | ||
// convert content that looks like asciidoc attributes (e.g {0}) to literal strings | ||
const escapeAttributes = (str: string): string => | ||
str.replace(/(\{\s*[\w\d-]+\s*\})/g, '+$1+'); | ||
// runs a bunch of required cleanup filters, where embedded code/text can break asciidoc rendering | ||
const cleanup = (str: string): string => { | ||
const filters = [ escapeComments, encodeBR, encodeEM, encodeStrong, encodeLinks, encodeCode ]; | ||
const filters = [ escapeComments, encodeBR, encodeEM, encodeStrong, encodeLinks, encodeCode, escapeAttributes ]; | ||
return filters.reduce((acc, filter) => filter(acc), str); | ||
@@ -66,0 +70,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
343572
6649