apple-notes-mcp 2.8.18 → 2.8.19
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 +15 -3
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -42910,10 +42910,22 @@ function appendMarkdownHtml(markdown) {
|
|
|
42910
42910
|
|
|
42911
42911
|
// src/utils/noteRevision.ts
|
|
42912
42912
|
var INLINE_TAG = /^<\/?(?:b|i|u|s|strike|em|strong|span|a|font|sub|sup|code|tt|small|big|mark)\b/i;
|
|
42913
|
+
var LEGACY_ENTITIES = {
|
|
42914
|
+
nbsp: " ",
|
|
42915
|
+
quot: '"',
|
|
42916
|
+
lt: "<",
|
|
42917
|
+
gt: ">",
|
|
42918
|
+
amp: "&"
|
|
42919
|
+
};
|
|
42913
42920
|
function comparableVisibleText(html) {
|
|
42914
|
-
return html.replace(/<br\s*\/?\s*>/gi, " ").replace(/<[^>]*>/g, (tag) => INLINE_TAG.test(tag) ? "" : " ").replace(
|
|
42915
|
-
|
|
42916
|
-
(_match,
|
|
42921
|
+
return html.replace(/<br\s*\/?\s*>/gi, " ").replace(/<[^>]*>/g, (tag) => INLINE_TAG.test(tag) ? "" : " ").replace(
|
|
42922
|
+
/&(?:(nbsp|quot|lt|gt|amp);?|apos;|#(\d+);|#x([0-9a-f]+);)/gi,
|
|
42923
|
+
(_match, legacy, dec, hex2) => {
|
|
42924
|
+
if (legacy) return LEGACY_ENTITIES[legacy.toLowerCase()];
|
|
42925
|
+
if (dec) return String.fromCodePoint(Number(dec));
|
|
42926
|
+
if (hex2) return String.fromCodePoint(Number.parseInt(hex2, 16));
|
|
42927
|
+
return "'";
|
|
42928
|
+
}
|
|
42917
42929
|
).replace(/\s+/g, " ").trim();
|
|
42918
42930
|
}
|
|
42919
42931
|
|
package/package.json
CHANGED