@markuplint/liquid-parser 3.6.1 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/parse.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parse = void 0;
4
4
  const html_parser_1 = require("@markuplint/html-parser");
5
5
  const parser_utils_1 = require("@markuplint/parser-utils");
6
- const parse = rawCode => {
6
+ const parse = (rawCode, options) => {
7
7
  const blocks = (0, parser_utils_1.ignoreBlock)(rawCode, [
8
8
  {
9
9
  type: 'liquid-block',
@@ -16,7 +16,7 @@ const parse = rawCode => {
16
16
  end: /}}/,
17
17
  },
18
18
  ]);
19
- const doc = (0, html_parser_1.parse)(blocks.replaced);
19
+ const doc = (0, html_parser_1.parse)(blocks.replaced, options);
20
20
  doc.nodeList = (0, parser_utils_1.restoreNode)(doc.nodeList, blocks);
21
21
  return doc;
22
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/liquid-parser",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Liquid template parser for markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -16,9 +16,9 @@
16
16
  "clean": "tsc --build --clean"
17
17
  },
18
18
  "dependencies": {
19
- "@markuplint/html-parser": "3.6.1",
19
+ "@markuplint/html-parser": "3.7.0",
20
20
  "@markuplint/ml-ast": "3.1.0",
21
- "@markuplint/parser-utils": "3.6.1"
21
+ "@markuplint/parser-utils": "3.7.0"
22
22
  },
23
- "gitHead": "3cdf5a088b2da03773d5d4461d0e65ec32290a00"
23
+ "gitHead": "adc6e432cccba7cfad0dc8bf9f92e5aaf1107359"
24
24
  }
@@ -0,0 +1,11 @@
1
+ const { parse } = require('../lib/');
2
+
3
+ describe('Tags', () => {
4
+ it('liquid-block', () => {
5
+ expect(parse('{% any %}').nodeList[0].nodeName).toBe('#ps:liquid-block');
6
+ });
7
+
8
+ it('liquid-output', () => {
9
+ expect(parse('{{ any }}').nodeList[0].nodeName).toBe('#ps:liquid-output');
10
+ });
11
+ });