@oh-my-pi/pi-utils 18.11.2 → 18.11.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.11.3] - 2026-10-16
6
+
7
+ ### Fixed
8
+
9
+ - Fixed Markdown fence info-string parsing to keep backtick-containing backtick openers as paragraph text while accepting backticks in tilde info strings and Unicode line separators in either fence's info string ([#15928](https://github.com/can1357/oh-my-pi/pull/15928) by [@jchanghong023](https://github.com/jchanghong023)).
10
+ - Fixed `parseHTML` treating `<link>` in RSS/Atom documents as an HTML void element, which dropped the URL text of RSS `<link>…</link>` ([#15954](https://github.com/can1357/oh-my-pi/issues/15954))
11
+
5
12
  ## [18.11.2] - 2026-10-16
6
13
 
7
14
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-utils",
3
- "version": "18.11.2",
3
+ "version": "18.11.3",
4
4
  "description": "Shared utilities for pi packages",
5
5
  "keywords": [
6
6
  "cli",
@@ -57,7 +57,7 @@
57
57
  "fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
58
58
  },
59
59
  "dependencies": {
60
- "@oh-my-pi/pi-natives": "18.11.2"
60
+ "@oh-my-pi/pi-natives": "18.11.3"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/bun": "^1.3.14"
package/src/dom/parser.ts CHANGED
@@ -366,7 +366,12 @@ export function parseInto(html: string, document: Document, root: Document | Doc
366
366
  index = match ? closePattern.lastIndex : html.length;
367
367
  continue;
368
368
  }
369
- if (!VOID_ELEMENTS[parsed.name] && !(namespace === SVG_NAMESPACE && parsed.selfClosing)) {
369
+ // Feed documents follow XML rules: only an explicit `/>` closes immediately, so RSS `<link>url</link>`
370
+ // keeps its text instead of being treated as an HTML void element.
371
+ const isVoid = xmlLike
372
+ ? parsed.selfClosing
373
+ : VOID_ELEMENTS[parsed.name] || (namespace === SVG_NAMESPACE && parsed.selfClosing);
374
+ if (!isVoid) {
370
375
  stack.push(element);
371
376
  parent = element;
372
377
  }
@@ -775,7 +775,10 @@ function splitTableRow(line: string): string[] {
775
775
  }
776
776
 
777
777
  function isFence(line: string): RegExpExecArray | null {
778
- return /^ {0,3}(`{3,}|~{3,})(.*?)(?:\n|$)$/.exec(line);
778
+ // Unicode line separators may occur in the info string.
779
+ const match = /^ {0,3}(`{3,}|~{3,})([^\n]*?)(?:\n|$)$/.exec(line);
780
+ // Backtick fences cannot contain backticks in their info string.
781
+ return match && match[1]!.startsWith("`") && match[2]!.includes("`") ? null : match;
779
782
  }
780
783
  function isHeading(line: string): boolean {
781
784
  return /^ {0,3}#{1,6}(?:\s|$)/.test(line);