jssm 5.162.25 → 5.162.26

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.
@@ -97,16 +97,22 @@ declare function configure(opts: {
97
97
  declare function vc(col: string): string;
98
98
  /**
99
99
  * Escape a string for safe interpolation inside a DOT double-quoted
100
- * attribute value. Replaces every `"` with `\"` so that group names,
101
- * state labels, and chip labels containing literal double-quotes produce
102
- * valid, parseable DOT source.
100
+ * attribute value. Escapes every `\` and `"` so that group names, state
101
+ * labels, and chip labels containing either character produce valid,
102
+ * parseable DOT source.
103
+ *
104
+ * Backslash is escaped *first*: a label ending in `\` would otherwise emit
105
+ * `label="a\"`, whose `\"` escapes the closing quote and corrupts the DOT so
106
+ * the whole render throws. Escaping `\`→`\\` before `"`→`\"` avoids
107
+ * double-escaping the backslashes the quote step introduces. StoneCypher/fsl#1951
103
108
  *
104
109
  * ```typescript
105
- * doublequote('a"b'); // 'a\\"b'
106
- * doublequote('safe'); // 'safe'
110
+ * doublequote('a"b'); // 'a\\"b'
111
+ * doublequote('a\\'); // 'a\\\\'
112
+ * doublequote('safe'); // 'safe'
107
113
  * ```
108
114
  * @param txt Any string that will be placed inside `"…"` in a DOT attribute.
109
- * @returns The string with every `"` replaced by `\"`.
115
+ * @returns The string with every `\` and `"` backslash-escaped.
110
116
  * @internal
111
117
  */
112
118
  declare function doublequote(txt: string): string;
@@ -24454,7 +24454,7 @@ function fslSemanticSpans(text) {
24454
24454
  * Useful for runtime diagnostics and for embedding in serialized machine
24455
24455
  * snapshots so that deserializers can detect version-skew.
24456
24456
  */
24457
- const version = "5.162.25";
24457
+ const version = "5.162.26";
24458
24458
 
24459
24459
  /**
24460
24460
  * The FSL Markdown fence convention parser — pure, host-agnostic logic that
@@ -30222,20 +30222,26 @@ function vc(col) {
30222
30222
  }
30223
30223
  /**
30224
30224
  * Escape a string for safe interpolation inside a DOT double-quoted
30225
- * attribute value. Replaces every `"` with `\"` so that group names,
30226
- * state labels, and chip labels containing literal double-quotes produce
30227
- * valid, parseable DOT source.
30225
+ * attribute value. Escapes every `\` and `"` so that group names, state
30226
+ * labels, and chip labels containing either character produce valid,
30227
+ * parseable DOT source.
30228
+ *
30229
+ * Backslash is escaped *first*: a label ending in `\` would otherwise emit
30230
+ * `label="a\"`, whose `\"` escapes the closing quote and corrupts the DOT so
30231
+ * the whole render throws. Escaping `\`→`\\` before `"`→`\"` avoids
30232
+ * double-escaping the backslashes the quote step introduces. StoneCypher/fsl#1951
30228
30233
  *
30229
30234
  * ```typescript
30230
- * doublequote('a"b'); // 'a\\"b'
30231
- * doublequote('safe'); // 'safe'
30235
+ * doublequote('a"b'); // 'a\\"b'
30236
+ * doublequote('a\\'); // 'a\\\\'
30237
+ * doublequote('safe'); // 'safe'
30232
30238
  * ```
30233
30239
  * @param txt Any string that will be placed inside `"…"` in a DOT attribute.
30234
- * @returns The string with every `"` replaced by `\"`.
30240
+ * @returns The string with every `\` and `"` backslash-escaped.
30235
30241
  * @internal
30236
30242
  */
30237
30243
  function doublequote(txt) {
30238
- return txt.replace(/"/g, String.raw `\"`);
30244
+ return txt.replace(/\\/g, String.raw `\\`).replace(/"/g, String.raw `\"`);
30239
30245
  }
30240
30246
  /**
30241
30247
  * URL schemes that are safe to emit into a rendered diagram's `<a xlink:href>`.