apple-notes-mcp 2.8.3 → 2.8.4
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/build/index.js +2 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -42536,8 +42536,9 @@ import { createHash } from "node:crypto";
|
|
|
42536
42536
|
function hashNoteContent(content) {
|
|
42537
42537
|
return `sha256:${createHash("sha256").update(content, "utf8").digest("hex")}`;
|
|
42538
42538
|
}
|
|
42539
|
+
var INLINE_TAG = /^<\/?(?:b|i|u|s|strike|em|strong|span|a|font|sub|sup|code|tt|small|big|mark)\b/i;
|
|
42539
42540
|
function comparableVisibleText(html) {
|
|
42540
|
-
return html.replace(/<br\s*\/?\s*>/gi, " ").replace(/<[^>]*>/g, " ").replace(/ | /gi, " ").replace(/"/gi, '"').replace(/'|'/gi, "'").replace(/</gi, "<").replace(/>/gi, ">").replace(/&/gi, "&").replace(/&#(\d+);/g, (_match, codePoint) => String.fromCodePoint(Number(codePoint))).replace(
|
|
42541
|
+
return html.replace(/<br\s*\/?\s*>/gi, " ").replace(/<[^>]*>/g, (tag) => INLINE_TAG.test(tag) ? "" : " ").replace(/ | /gi, " ").replace(/"/gi, '"').replace(/'|'/gi, "'").replace(/</gi, "<").replace(/>/gi, ">").replace(/&/gi, "&").replace(/&#(\d+);/g, (_match, codePoint) => String.fromCodePoint(Number(codePoint))).replace(
|
|
42541
42542
|
/&#x([0-9a-f]+);/gi,
|
|
42542
42543
|
(_match, codePoint) => String.fromCodePoint(Number.parseInt(codePoint, 16))
|
|
42543
42544
|
).replace(/\s+/g, " ").trim();
|
package/package.json
CHANGED