@quartz-community/github-flavored-markdown 0.1.0 → 2.0.0

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
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 020474b: Run before `obsidian-flavored-markdown` (`defaultOrder` 40 → 30)
8
+
9
+ A combined micromark extension prepends its constructs, so where two plugins claim
10
+ the same character the **later-registered** one wins. With this plugin ordered after
11
+ `obsidian-flavored-markdown`, GFM owned every character both wanted — `~` most
12
+ visibly — and Obsidian's own tokenizers could not run at all.
13
+
14
+ Obsidian's strikethrough is not GFM's: it closes on the first `~~` it reaches,
15
+ honours no escape, and has no single-tilde form. Reproducing that needs this plugin
16
+ to register first.
17
+
18
+ Measured on `remark-obsidian`'s recorded Obsidian corpus: the reorder on its own is
19
+ behaviour-neutral (0 cases fixed, 0 broken, which also clears the one real risk —
20
+ both plugins claim `[`, GFM's footnote against Obsidian's wikilink), and it lets 21
21
+ strikethrough cases match with no regression.
22
+
23
+ Rendered output changes for notes using `~~`, hence the major bump.
24
+
25
+ ## 1.0.0
26
+
27
+ ### Major Changes
28
+
29
+ - Stable 1.0 release. All `@quartz-community/*` dependencies now use `^1.0.0` ranges.
30
+
31
+ Pre-1.0 caret ranges pinned the minor version (`^0.2.1` means `>=0.2.1 <0.3.0`), so
32
+ published fixes to shared packages could never be resolved by dependents. Moving the
33
+ ecosystem to 1.0 makes caret ranges behave conventionally.
34
+
3
35
  All notable changes to this project will be documented in this file.
4
36
 
5
37
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
 
31
31
  // node_modules/extend/index.js
32
32
  var require_extend = __commonJS({
33
- "node_modules/extend/index.js"(exports$1, module) {
33
+ "node_modules/extend/index.js"(exports, module) {
34
34
  var hasOwn = Object.prototype.hasOwnProperty;
35
35
  var toStr = Object.prototype.toString;
36
36
  var defineProperty = Object.defineProperty;
@@ -6112,6 +6112,18 @@ var BIGINT = 8;
6112
6112
 
6113
6113
  // node_modules/@ungap/structured-clone/esm/deserialize.js
6114
6114
  var env = typeof self === "object" ? self : globalThis;
6115
+ var guard = (name, init) => {
6116
+ switch (name) {
6117
+ case "Function":
6118
+ case "SharedWorker":
6119
+ case "Worker":
6120
+ case "eval":
6121
+ case "setInterval":
6122
+ case "setTimeout":
6123
+ throw new TypeError("unable to deserialize " + name);
6124
+ }
6125
+ return new env[name](init);
6126
+ };
6115
6127
  var deserializer = ($, _) => {
6116
6128
  const as = (out, index2) => {
6117
6129
  $.set(index2, out);
@@ -6157,7 +6169,10 @@ var deserializer = ($, _) => {
6157
6169
  }
6158
6170
  case ERROR: {
6159
6171
  const { name, message } = value;
6160
- return as(new env[name](message), index2);
6172
+ return as(
6173
+ typeof env[name] === "function" ? guard(name, message) : new Error(message),
6174
+ index2
6175
+ );
6161
6176
  }
6162
6177
  case BIGINT:
6163
6178
  return as(BigInt(value), index2);
@@ -6170,7 +6185,7 @@ var deserializer = ($, _) => {
6170
6185
  return as(new DataView(buffer), value);
6171
6186
  }
6172
6187
  }
6173
- return as(new env[type](value), index2);
6188
+ return as(guard(type, value), index2);
6174
6189
  };
6175
6190
  return unpair;
6176
6191
  };
@@ -6203,8 +6218,8 @@ var typeOf = (value) => {
6203
6218
  }
6204
6219
  if (asString.includes("Array"))
6205
6220
  return [ARRAY, asString];
6206
- if (asString.includes("Error"))
6207
- return [ERROR, asString];
6221
+ if (value instanceof Error)
6222
+ return [ERROR, value.name || "Error"];
6208
6223
  return [OBJECT, asString];
6209
6224
  };
6210
6225
  var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
@@ -6275,7 +6290,7 @@ var serializer = (strict, json, $, _) => {
6275
6290
  return index2;
6276
6291
  }
6277
6292
  case DATE:
6278
- return as([TYPE, value.toISOString()], value);
6293
+ return as([TYPE, isNaN(value.getTime()) ? EMPTY : value.toISOString()], value);
6279
6294
  case REGEXP: {
6280
6295
  const { source, flags } = value;
6281
6296
  return as([TYPE, { source, flags }], value);