From 716ea12292fd78a160a85e3ebdc6c3f3f25f9612 Mon Sep 17 00:00:00 2001 From: Shuhei Iitsuka Date: Tue, 30 Nov 2021 14:02:07 +0900 Subject: [PATCH 1/2] Export the parser threshold value --- javascript/src/parser.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/javascript/src/parser.ts b/javascript/src/parser.ts index 362901aa..83b7365f 100644 --- a/javascript/src/parser.ts +++ b/javascript/src/parser.ts @@ -20,7 +20,10 @@ import {model as jaKNBCModel} from './data/models/ja-knbc'; import {parseFromString} from './dom'; import {bisectRight, SEP} from './utils'; -const DEFAULT_THRES = 1000; +/** + * The default threshold value for the parser. + */ +export const DEFAULT_THRES = 1000; // We could use `Node.TEXT_NODE` and `Node.ELEMENT_NODE` in a browser context, // but we define the same here for Node.js environments. From bc0bc94ca2e4e1b70f386c1d5d3a89bbf8b5f36f Mon Sep 17 00:00:00 2001 From: Shuhei Iitsuka Date: Tue, 30 Nov 2021 14:04:04 +0900 Subject: [PATCH 2/2] Update parser.ts --- javascript/src/parser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/src/parser.ts b/javascript/src/parser.ts index 83b7365f..6b803a95 100644 --- a/javascript/src/parser.ts +++ b/javascript/src/parser.ts @@ -20,9 +20,9 @@ import {model as jaKNBCModel} from './data/models/ja-knbc'; import {parseFromString} from './dom'; import {bisectRight, SEP} from './utils'; -/** - * The default threshold value for the parser. - */ +/** + * The default threshold value for the parser. + */ export const DEFAULT_THRES = 1000; // We could use `Node.TEXT_NODE` and `Node.ELEMENT_NODE` in a browser context,