Socket
Socket
Sign inDemoInstall

code-block-writer

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-block-writer - npm Package Compare versions

Comparing version 7.3.0 to 7.3.1

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="7.3.1"></a>
## [7.3.1](https://github.com/dsherret/code-block-writer/compare/v7.3.0...v7.3.1) (2019-04-14)
### Bug Fixes
* `isInString()` was not handling escaped string characters. ([a357278](https://github.com/dsherret/code-block-writer/commit/a357278))
<a name="7.3.0"></a>

@@ -7,0 +17,0 @@ # [7.3.0](https://github.com/dsherret/code-block-writer/compare/v7.2.2...v7.3.0) (2019-03-16)

4

dist/code-block-writer.js

@@ -385,3 +385,3 @@ "use strict";

var lastStringCharOnStack = this._stringCharStack.length === 0 ? undefined : this._stringCharStack[this._stringCharStack.length - 1];
if (currentChar === "\"" || currentChar === "'" || currentChar === "`") {
if (pastChar !== "\\" && (currentChar === "\"" || currentChar === "'" || currentChar === "`")) {
if (lastStringCharOnStack === currentChar)

@@ -392,3 +392,3 @@ this._stringCharStack.pop();

}
else if (pastChar === "$" && currentChar === "{" && lastStringCharOnStack === "`")
else if (pastPastChar !== "\\" && pastChar === "$" && currentChar === "{" && lastStringCharOnStack === "`")
this._stringCharStack.push(currentChar);

@@ -395,0 +395,0 @@ else if (currentChar === "}" && lastStringCharOnStack === "{")

{
"name": "code-block-writer",
"version": "7.3.0",
"version": "7.3.1",
"description": "A simple code writer that assists with formatting and visualizing blocks of code.",

@@ -5,0 +5,0 @@ "main": "dist/code-block-writer.js",

@@ -9,3 +9,3 @@ code-block-writer

A simple code writer that assists with formatting and visualizing blocks of JavaScript or TypeScript code.
Code writer that assists with formatting and visualizing blocks of JavaScript or TypeScript code.

@@ -98,1 +98,5 @@ ```

* Escapes newlines within double and single quotes created with `.quote(text)`.
## C# Version
See [CodeBlockWriterSharp](https://github.com/dsherret/CodeBlockWriterSharp).
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