@wdprlib/parser 2.0.2 → 2.0.3

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/dist/index.cjs CHANGED
@@ -2950,6 +2950,16 @@ function parseTableCell(ctx, startPos, cellStart) {
2950
2950
  if (isTableColToken(token.type)) {
2951
2951
  break;
2952
2952
  }
2953
+ if (token.type === "WHITESPACE") {
2954
+ const nextTok = ctx.tokens[pos + 1];
2955
+ const afterTok = ctx.tokens[pos + 2];
2956
+ if (nextTok?.type === "UNDERSCORE" && afterTok && (afterTok.type === "NEWLINE" || afterTok.type === "EOF")) {
2957
+ children.push({ element: "line-break" });
2958
+ pos += 3;
2959
+ consumed += 3;
2960
+ continue;
2961
+ }
2962
+ }
2953
2963
  if (token.type === "WHITESPACE") {
2954
2964
  children.push({ element: "text", data: token.value });
2955
2965
  pos++;
package/dist/index.js CHANGED
@@ -2895,6 +2895,16 @@ function parseTableCell(ctx, startPos, cellStart) {
2895
2895
  if (isTableColToken(token.type)) {
2896
2896
  break;
2897
2897
  }
2898
+ if (token.type === "WHITESPACE") {
2899
+ const nextTok = ctx.tokens[pos + 1];
2900
+ const afterTok = ctx.tokens[pos + 2];
2901
+ if (nextTok?.type === "UNDERSCORE" && afterTok && (afterTok.type === "NEWLINE" || afterTok.type === "EOF")) {
2902
+ children.push({ element: "line-break" });
2903
+ pos += 3;
2904
+ consumed += 3;
2905
+ continue;
2906
+ }
2907
+ }
2898
2908
  if (token.type === "WHITESPACE") {
2899
2909
  children.push({ element: "text", data: token.value });
2900
2910
  pos++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdprlib/parser",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Parser for Wikidot markup",
5
5
  "keywords": [
6
6
  "ast",