textarea-markdown
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -256,11 +256,11 @@ "use strict"; | ||
value: async function replacePlaceholderTag(placeholderTag, filename, fileSize, url) { | ||
var commonPlaceholderTag = placeholderTag.replace(/%filename/, filename).replace(/%url/, url); | ||
var commonPlaceholderTag = placeholderTag.replace(/%filename/g, filename).replace(/%url/g, url); | ||
if (placeholderTag === this.options.uploadImageTag) { | ||
var dimensions = await this.fetchImageDimensions(url); | ||
return commonPlaceholderTag.replace(/%width/, dimensions.width).replace(/%height/, dimensions.height); | ||
return commonPlaceholderTag.replace(/%width/g, dimensions.width).replace(/%height/g, dimensions.height); | ||
} else if (placeholderTag === this.options.uploadVideoTag) { | ||
return commonPlaceholderTag; | ||
} else { | ||
return commonPlaceholderTag.replace(/%fileSize/, fileSize); | ||
return commonPlaceholderTag.replace(/%fileSize/g, fileSize); | ||
} | ||
@@ -267,0 +267,0 @@ } |
{ | ||
"name": "textarea-markdown", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "Make textarea a markdown editor.", | ||
@@ -5,0 +5,0 @@ "main": "lib/textarea-markdown.js", |
@@ -193,4 +193,4 @@ import "whatwg-fetch"; | ||
const commonPlaceholderTag = placeholderTag | ||
.replace(/%filename/, filename) | ||
.replace(/%url/, url); | ||
.replace(/%filename/g, filename) | ||
.replace(/%url/g, url); | ||
@@ -200,8 +200,8 @@ if (placeholderTag === this.options.uploadImageTag) { | ||
return commonPlaceholderTag | ||
.replace(/%width/, dimensions.width) | ||
.replace(/%height/, dimensions.height); | ||
.replace(/%width/g, dimensions.width) | ||
.replace(/%height/g, dimensions.height); | ||
} else if (placeholderTag === this.options.uploadVideoTag) { | ||
return commonPlaceholderTag; | ||
} else { | ||
return commonPlaceholderTag.replace(/%fileSize/, fileSize); | ||
return commonPlaceholderTag.replace(/%fileSize/g, fileSize); | ||
} | ||
@@ -208,0 +208,0 @@ } |
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
23741