Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textarea-markdown

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textarea-markdown - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

6

lib/textarea-markdown.js

@@ -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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc