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

@bbob/parser

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbob/parser - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="1.0.10"></a>
## [1.0.10](https://github.com/JiLiZART/bbob/compare/@bbob/parser@1.0.9...@bbob/parser@1.0.10) (2018-07-11)
### Bug Fixes
* **parser:** tokenizer error with quotemark strings ([7f40050](https://github.com/JiLiZART/bbob/commit/7f40050))
<a name="1.0.9"></a>

@@ -8,0 +19,0 @@ ## [1.0.9](https://github.com/JiLiZART/bbob/compare/@bbob/parser@1.0.8...@bbob/parser@1.0.9) (2018-07-10)

14

lib/parse.js

@@ -170,5 +170,11 @@ const {

appendNode(lastNestedNode);
} else {
// eslint-disable-next-line no-console
console.warn(`Inconsistent tag '${getTokenValue(token)}' on line ${getTokenLine(token)} and column ${getTokenColumn(token)}`);
} else if (options.onError) {
const tag = getTokenValue(token);
const line = getTokenLine(token);
const column = getTokenColumn(token);
options.onError({
message: `Inconsistent tag '${tag}' on line ${line} and column ${column}`,
lineNumber: line,
columnNumber: column,
});
}

@@ -232,4 +238,4 @@ }

const parse = (input, opts = {}) => {
options = opts;
tokenizer = createTokenizer(input, parseToken);
options = opts;

@@ -236,0 +242,0 @@ nodes = [];

@@ -222,3 +222,7 @@ const {

} else if (!this.inTag()) {
this.wordToken[Token.VALUE_ID] += getChar(charCode);
if (!this.wordToken) {
this.wordToken = this.createWordToken(getChar(charCode));
} else {
this.wordToken[Token.VALUE_ID] += getChar(charCode);
}
}

@@ -225,0 +229,0 @@

{
"name": "@bbob/parser",
"version": "1.0.9",
"version": "1.0.10",
"description": "Fast, flexible, and lean implementation of BBcode parser",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/JiLiZART/bbob",

# @bbob/parser
[![install size](https://packagephobia.now.sh/badge?p=@bbob/parser)](https://packagephobia.now.sh/result?p=@bbob/parser)
Parses BBCode and returns AST Tree looks like
`[url=]hello world![/url]`
to
```json
[
{
tag: 'url',
attrs: {
url: 'https://github.com/JiLiZART/bbob/tree/master/packages/bbob-parser'
"tag": "url",
"attrs": {
"url": "https://github.com/JiLiZART/bbob/tree/master/packages/bbob-parser"
},
content: ['hello', ' ', 'world!']
"content": ["hello", " ", "world!"]
}
]
```
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