vue-editify 0.2.26 → 0.2.28

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/lib/editify.es.js CHANGED
@@ -2848,10 +2848,7 @@ const setEditorDomObserve = function() {
2848
2848
  if (!window.MutationObserver) {
2849
2849
  console.warn("The current browser does not support MutationObserver");
2850
2850
  }
2851
- if (this.__domObserver) {
2852
- this.__domObserver.disconnect();
2853
- this.__domObserver = null;
2854
- }
2851
+ removeEditorDomObserve.apply(this);
2855
2852
  this.__domObserver = new MutationObserver((mutationList) => {
2856
2853
  let length = mutationList.length;
2857
2854
  for (let i = 0; i < length; i++) {
@@ -4246,9 +4243,6 @@ class AlexEditor {
4246
4243
  */
4247
4244
  rangeRender() {
4248
4245
  return new Promise((resolve) => {
4249
- if (this.disabled) {
4250
- return resolve();
4251
- }
4252
4246
  const selection = window.getSelection();
4253
4247
  if (!selection) {
4254
4248
  return resolve();
@@ -4974,7 +4968,7 @@ class AlexEditor {
4974
4968
  event$1.off(this.$el, "beforeinput.alex_editor compositionstart.alex_editor compositionupdate.alex_editor compositionend.alex_editor keydown.alex_editor cut.alex_editor paste.alex_editor copy.alex_editor dragstart.alex_editor drop.alex_editor focus.alex_editor blur.alex_editor");
4975
4969
  }
4976
4970
  }
4977
- const version$2 = "1.4.40";
4971
+ const version$2 = "1.5.1";
4978
4972
  console.log(`%c alex-editor %c v${version$2} `, "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;", "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;");
4979
4973
  const number = {
4980
4974
  /**
@@ -6568,7 +6562,8 @@ class Response {
6568
6562
  * @param {CompiledMode} mode
6569
6563
  */
6570
6564
  constructor(mode) {
6571
- if (mode.data === void 0) mode.data = {};
6565
+ if (mode.data === void 0)
6566
+ mode.data = {};
6572
6567
  this.data = mode.data;
6573
6568
  this.isMatchIgnored = false;
6574
6569
  }
@@ -6635,7 +6630,8 @@ class HTMLRenderer {
6635
6630
  *
6636
6631
  * @param {Node} node */
6637
6632
  openNode(node) {
6638
- if (!emitsWrappingTags(node)) return;
6633
+ if (!emitsWrappingTags(node))
6634
+ return;
6639
6635
  const className = scopeToCSSClass(
6640
6636
  node.scope,
6641
6637
  { prefix: this.classPrefix }
@@ -6647,7 +6643,8 @@ class HTMLRenderer {
6647
6643
  *
6648
6644
  * @param {Node} node */
6649
6645
  closeNode(node) {
6650
- if (!emitsWrappingTags(node)) return;
6646
+ if (!emitsWrappingTags(node))
6647
+ return;
6651
6648
  this.buffer += SPAN_CLOSE;
6652
6649
  }
6653
6650
  /**
@@ -6698,7 +6695,8 @@ class TokenTree {
6698
6695
  return void 0;
6699
6696
  }
6700
6697
  closeAllNodes() {
6701
- while (this.closeNode()) ;
6698
+ while (this.closeNode())
6699
+ ;
6702
6700
  }
6703
6701
  toJSON() {
6704
6702
  return JSON.stringify(this.rootNode, null, 4);
@@ -6728,8 +6726,10 @@ class TokenTree {
6728
6726
  * @param {Node} node
6729
6727
  */
6730
6728
  static _collapse(node) {
6731
- if (typeof node === "string") return;
6732
- if (!node.children) return;
6729
+ if (typeof node === "string")
6730
+ return;
6731
+ if (!node.children)
6732
+ return;
6733
6733
  if (node.children.every((el) => typeof el === "string")) {
6734
6734
  node.children = [node.children.join("")];
6735
6735
  } else {
@@ -6769,7 +6769,8 @@ class TokenTreeEmitter extends TokenTree {
6769
6769
  */
6770
6770
  __addSublanguage(emitter, name) {
6771
6771
  const node = emitter.root;
6772
- if (name) node.scope = `language:${name}`;
6772
+ if (name)
6773
+ node.scope = `language:${name}`;
6773
6774
  this.add(node);
6774
6775
  }
6775
6776
  toHTML() {
@@ -6782,8 +6783,10 @@ class TokenTreeEmitter extends TokenTree {
6782
6783
  }
6783
6784
  }
6784
6785
  function source$1(re) {
6785
- if (!re) return null;
6786
- if (typeof re === "string") return re;
6786
+ if (!re)
6787
+ return null;
6788
+ if (typeof re === "string")
6789
+ return re;
6787
6790
  return re.source;
6788
6791
  }
6789
6792
  function lookahead$1(re) {
@@ -6872,7 +6875,8 @@ const SHEBANG = (opts = {}) => {
6872
6875
  relevance: 0,
6873
6876
  /** @type {ModeCallback} */
6874
6877
  "on:begin": (m, resp) => {
6875
- if (m.index !== 0) resp.ignoreMatch();
6878
+ if (m.index !== 0)
6879
+ resp.ignoreMatch();
6876
6880
  }
6877
6881
  }, opts);
6878
6882
  };
@@ -7022,7 +7026,8 @@ const END_SAME_AS_BEGIN = function(mode) {
7022
7026
  },
7023
7027
  /** @type {ModeCallback} */
7024
7028
  "on:end": (m, resp) => {
7025
- if (resp.data._beginMatch !== m[1]) resp.ignoreMatch();
7029
+ if (resp.data._beginMatch !== m[1])
7030
+ resp.ignoreMatch();
7026
7031
  }
7027
7032
  }
7028
7033
  );
@@ -7067,30 +7072,39 @@ function scopeClassName(mode, _parent) {
7067
7072
  }
7068
7073
  }
7069
7074
  function beginKeywords(mode, parent) {
7070
- if (!parent) return;
7071
- if (!mode.beginKeywords) return;
7075
+ if (!parent)
7076
+ return;
7077
+ if (!mode.beginKeywords)
7078
+ return;
7072
7079
  mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)";
7073
7080
  mode.__beforeBegin = skipIfHasPrecedingDot;
7074
7081
  mode.keywords = mode.keywords || mode.beginKeywords;
7075
7082
  delete mode.beginKeywords;
7076
- if (mode.relevance === void 0) mode.relevance = 0;
7083
+ if (mode.relevance === void 0)
7084
+ mode.relevance = 0;
7077
7085
  }
7078
7086
  function compileIllegal(mode, _parent) {
7079
- if (!Array.isArray(mode.illegal)) return;
7087
+ if (!Array.isArray(mode.illegal))
7088
+ return;
7080
7089
  mode.illegal = either$1(...mode.illegal);
7081
7090
  }
7082
7091
  function compileMatch(mode, _parent) {
7083
- if (!mode.match) return;
7084
- if (mode.begin || mode.end) throw new Error("begin & end are not supported with match");
7092
+ if (!mode.match)
7093
+ return;
7094
+ if (mode.begin || mode.end)
7095
+ throw new Error("begin & end are not supported with match");
7085
7096
  mode.begin = mode.match;
7086
7097
  delete mode.match;
7087
7098
  }
7088
7099
  function compileRelevance(mode, _parent) {
7089
- if (mode.relevance === void 0) mode.relevance = 1;
7100
+ if (mode.relevance === void 0)
7101
+ mode.relevance = 1;
7090
7102
  }
7091
7103
  const beforeMatchExt = (mode, parent) => {
7092
- if (!mode.beforeMatch) return;
7093
- if (mode.starts) throw new Error("beforeMatch cannot be used with starts");
7104
+ if (!mode.beforeMatch)
7105
+ return;
7106
+ if (mode.starts)
7107
+ throw new Error("beforeMatch cannot be used with starts");
7094
7108
  const originalMode = Object.assign({}, mode);
7095
7109
  Object.keys(mode).forEach((key) => {
7096
7110
  delete mode[key];
@@ -7165,7 +7179,8 @@ const warn = (message, ...args) => {
7165
7179
  console.log(`WARN: ${message}`, ...args);
7166
7180
  };
7167
7181
  const deprecated = (version2, message) => {
7168
- if (seenDeprecations[`${version2}/${message}`]) return;
7182
+ if (seenDeprecations[`${version2}/${message}`])
7183
+ return;
7169
7184
  console.log(`Deprecated as of ${version2}. ${message}`);
7170
7185
  seenDeprecations[`${version2}/${message}`] = true;
7171
7186
  };
@@ -7185,7 +7200,8 @@ function remapScopeNames(mode, regexes, { key }) {
7185
7200
  mode[key]._multi = true;
7186
7201
  }
7187
7202
  function beginMultiClass(mode) {
7188
- if (!Array.isArray(mode.begin)) return;
7203
+ if (!Array.isArray(mode.begin))
7204
+ return;
7189
7205
  if (mode.skip || mode.excludeBegin || mode.returnBegin) {
7190
7206
  error("skip, excludeBegin, returnBegin not compatible with beginScope: {}");
7191
7207
  throw MultiClassError;
@@ -7198,7 +7214,8 @@ function beginMultiClass(mode) {
7198
7214
  mode.begin = _rewriteBackreferences(mode.begin, { joinWith: "" });
7199
7215
  }
7200
7216
  function endMultiClass(mode) {
7201
- if (!Array.isArray(mode.end)) return;
7217
+ if (!Array.isArray(mode.end))
7218
+ return;
7202
7219
  if (mode.skip || mode.excludeEnd || mode.returnEnd) {
7203
7220
  error("skip, excludeEnd, returnEnd not compatible with endScope: {}");
7204
7221
  throw MultiClassError;
@@ -7279,7 +7296,8 @@ function compileLanguage(language) {
7279
7296
  }
7280
7297
  // @ts-ignore
7281
7298
  getMatcher(index) {
7282
- if (this.multiRegexes[index]) return this.multiRegexes[index];
7299
+ if (this.multiRegexes[index])
7300
+ return this.multiRegexes[index];
7283
7301
  const matcher = new MultiRegex();
7284
7302
  this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));
7285
7303
  matcher.compile();
@@ -7295,7 +7313,8 @@ function compileLanguage(language) {
7295
7313
  // @ts-ignore
7296
7314
  addRule(re, opts) {
7297
7315
  this.rules.push([re, opts]);
7298
- if (opts.type === "begin") this.count++;
7316
+ if (opts.type === "begin")
7317
+ this.count++;
7299
7318
  }
7300
7319
  /** @param {string} s */
7301
7320
  exec(s) {
@@ -7303,7 +7322,8 @@ function compileLanguage(language) {
7303
7322
  m.lastIndex = this.lastIndex;
7304
7323
  let result = m.exec(s);
7305
7324
  if (this.resumingScanAtSamePosition()) {
7306
- if (result && result.index === this.lastIndex) ;
7325
+ if (result && result.index === this.lastIndex)
7326
+ ;
7307
7327
  else {
7308
7328
  const m2 = this.getMatcher(0);
7309
7329
  m2.lastIndex = this.lastIndex + 1;
@@ -7335,7 +7355,8 @@ function compileLanguage(language) {
7335
7355
  /** @type CompiledMode */
7336
7356
  mode
7337
7357
  );
7338
- if (mode.isCompiled) return cmode;
7358
+ if (mode.isCompiled)
7359
+ return cmode;
7339
7360
  [
7340
7361
  scopeClassName,
7341
7362
  // do this early so compiler extensions generally don't have to worry about
@@ -7367,20 +7388,25 @@ function compileLanguage(language) {
7367
7388
  }
7368
7389
  cmode.keywordPatternRe = langRe(keywordPattern, true);
7369
7390
  if (parent) {
7370
- if (!mode.begin) mode.begin = /\B|\b/;
7391
+ if (!mode.begin)
7392
+ mode.begin = /\B|\b/;
7371
7393
  cmode.beginRe = langRe(cmode.begin);
7372
- if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
7373
- if (mode.end) cmode.endRe = langRe(cmode.end);
7394
+ if (!mode.end && !mode.endsWithParent)
7395
+ mode.end = /\B|\b/;
7396
+ if (mode.end)
7397
+ cmode.endRe = langRe(cmode.end);
7374
7398
  cmode.terminatorEnd = source$1(cmode.end) || "";
7375
7399
  if (mode.endsWithParent && parent.terminatorEnd) {
7376
7400
  cmode.terminatorEnd += (mode.end ? "|" : "") + parent.terminatorEnd;
7377
7401
  }
7378
7402
  }
7379
- if (mode.illegal) cmode.illegalRe = langRe(
7380
- /** @type {RegExp | string} */
7381
- mode.illegal
7382
- );
7383
- if (!mode.contains) mode.contains = [];
7403
+ if (mode.illegal)
7404
+ cmode.illegalRe = langRe(
7405
+ /** @type {RegExp | string} */
7406
+ mode.illegal
7407
+ );
7408
+ if (!mode.contains)
7409
+ mode.contains = [];
7384
7410
  mode.contains = [].concat(...mode.contains.map(function(c2) {
7385
7411
  return expandOrCloneMode(c2 === "self" ? mode : c2);
7386
7412
  }));
@@ -7397,7 +7423,8 @@ function compileLanguage(language) {
7397
7423
  cmode.matcher = buildModeRegex(cmode);
7398
7424
  return cmode;
7399
7425
  }
7400
- if (!language.compilerExtensions) language.compilerExtensions = [];
7426
+ if (!language.compilerExtensions)
7427
+ language.compilerExtensions = [];
7401
7428
  if (language.contains && language.contains.includes("self")) {
7402
7429
  throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
7403
7430
  }
@@ -7408,7 +7435,8 @@ function compileLanguage(language) {
7408
7435
  );
7409
7436
  }
7410
7437
  function dependencyOnParent(mode) {
7411
- if (!mode) return false;
7438
+ if (!mode)
7439
+ return false;
7412
7440
  return mode.endsWithParent || dependencyOnParent(mode.starts);
7413
7441
  }
7414
7442
  function expandOrCloneMode(mode) {
@@ -7428,7 +7456,7 @@ function expandOrCloneMode(mode) {
7428
7456
  }
7429
7457
  return mode;
7430
7458
  }
7431
- var version$1 = "11.10.0";
7459
+ var version$1 = "11.9.0";
7432
7460
  class HTMLInjectionError extends Error {
7433
7461
  constructor(reason, html) {
7434
7462
  super(reason);
@@ -7525,7 +7553,8 @@ const HLJS = function(hljs) {
7525
7553
  emitter.addText(buf);
7526
7554
  buf = "";
7527
7555
  keywordHits[word] = (keywordHits[word] || 0) + 1;
7528
- if (keywordHits[word] <= MAX_KEYWORD_HITS) relevance += keywordRelevance;
7556
+ if (keywordHits[word] <= MAX_KEYWORD_HITS)
7557
+ relevance += keywordRelevance;
7529
7558
  if (kind.startsWith("_")) {
7530
7559
  buf += match[0];
7531
7560
  } else {
@@ -7542,7 +7571,8 @@ const HLJS = function(hljs) {
7542
7571
  emitter.addText(buf);
7543
7572
  }
7544
7573
  function processSubLanguage() {
7545
- if (modeBuffer === "") return;
7574
+ if (modeBuffer === "")
7575
+ return;
7546
7576
  let result2 = null;
7547
7577
  if (typeof top.subLanguage === "string") {
7548
7578
  if (!languages2[top.subLanguage]) {
@@ -7569,7 +7599,8 @@ const HLJS = function(hljs) {
7569
7599
  modeBuffer = "";
7570
7600
  }
7571
7601
  function emitKeyword(keyword, scope) {
7572
- if (keyword === "") return;
7602
+ if (keyword === "")
7603
+ return;
7573
7604
  emitter.startScope(scope);
7574
7605
  emitter.addText(keyword);
7575
7606
  emitter.endScope();
@@ -7616,7 +7647,8 @@ const HLJS = function(hljs) {
7616
7647
  if (mode["on:end"]) {
7617
7648
  const resp = new Response(mode);
7618
7649
  mode["on:end"](match, resp);
7619
- if (resp.isMatchIgnored) matched = false;
7650
+ if (resp.isMatchIgnored)
7651
+ matched = false;
7620
7652
  }
7621
7653
  if (matched) {
7622
7654
  while (mode.endsParent && mode.parent) {
@@ -7644,9 +7676,11 @@ const HLJS = function(hljs) {
7644
7676
  const resp = new Response(newMode);
7645
7677
  const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
7646
7678
  for (const cb of beforeCallbacks) {
7647
- if (!cb) continue;
7679
+ if (!cb)
7680
+ continue;
7648
7681
  cb(match, resp);
7649
- if (resp.isMatchIgnored) return doIgnore(lexeme);
7682
+ if (resp.isMatchIgnored)
7683
+ return doIgnore(lexeme);
7650
7684
  }
7651
7685
  if (newMode.skip) {
7652
7686
  modeBuffer += lexeme;
@@ -7779,7 +7813,8 @@ const HLJS = function(hljs) {
7779
7813
  }
7780
7814
  top.matcher.lastIndex = index;
7781
7815
  const match = top.matcher.exec(codeToHighlight);
7782
- if (!match) break;
7816
+ if (!match)
7817
+ break;
7783
7818
  const beforeMatch = codeToHighlight.substring(index, match.index);
7784
7819
  const processedCount = processLexeme(beforeMatch, match);
7785
7820
  index = match.index + processedCount;
@@ -7848,7 +7883,8 @@ const HLJS = function(hljs) {
7848
7883
  );
7849
7884
  results.unshift(plaintext2);
7850
7885
  const sorted = results.sort((a, b) => {
7851
- if (a.relevance !== b.relevance) return b.relevance - a.relevance;
7886
+ if (a.relevance !== b.relevance)
7887
+ return b.relevance - a.relevance;
7852
7888
  if (a.language && b.language) {
7853
7889
  if (getLanguage(a.language).supersetOf === b.language) {
7854
7890
  return 1;
@@ -7871,7 +7907,8 @@ const HLJS = function(hljs) {
7871
7907
  function highlightElement(element2) {
7872
7908
  let node = null;
7873
7909
  const language = blockLanguage(element2);
7874
- if (shouldNotHighlight(language)) return;
7910
+ if (shouldNotHighlight(language))
7911
+ return;
7875
7912
  fire(
7876
7913
  "before:highlightElement",
7877
7914
  { el: element2, language }
@@ -7936,7 +7973,8 @@ const HLJS = function(hljs) {
7936
7973
  blocks.forEach(highlightElement);
7937
7974
  }
7938
7975
  function boot() {
7939
- if (wantsHighlight) highlightAll();
7976
+ if (wantsHighlight)
7977
+ highlightAll();
7940
7978
  }
7941
7979
  if (typeof window !== "undefined" && window.addEventListener) {
7942
7980
  window.addEventListener("DOMContentLoaded", boot, false);
@@ -7954,7 +7992,8 @@ const HLJS = function(hljs) {
7954
7992
  }
7955
7993
  lang = PLAINTEXT_LANGUAGE;
7956
7994
  }
7957
- if (!lang.name) lang.name = languageName;
7995
+ if (!lang.name)
7996
+ lang.name = languageName;
7958
7997
  languages2[languageName] = lang;
7959
7998
  lang.rawDefinition = languageDefinition.bind(null, hljs);
7960
7999
  if (lang.aliases) {
@@ -8107,7 +8146,6 @@ function json(hljs) {
8107
8146
  };
8108
8147
  return {
8109
8148
  name: "JSON",
8110
- aliases: ["jsonc"],
8111
8149
  keywords: {
8112
8150
  literal: LITERALS2
8113
8151
  },
@@ -8364,7 +8402,7 @@ function javascript$1(hljs) {
8364
8402
  // defined later
8365
8403
  };
8366
8404
  const HTML_TEMPLATE = {
8367
- begin: ".?html`",
8405
+ begin: "html`",
8368
8406
  end: "",
8369
8407
  starts: {
8370
8408
  end: "`",
@@ -8377,7 +8415,7 @@ function javascript$1(hljs) {
8377
8415
  }
8378
8416
  };
8379
8417
  const CSS_TEMPLATE = {
8380
- begin: ".?css`",
8418
+ begin: "css`",
8381
8419
  end: "",
8382
8420
  starts: {
8383
8421
  end: "`",
@@ -8390,7 +8428,7 @@ function javascript$1(hljs) {
8390
8428
  }
8391
8429
  };
8392
8430
  const GRAPHQL_TEMPLATE = {
8393
- begin: ".?gql`",
8431
+ begin: "gql`",
8394
8432
  end: "",
8395
8433
  starts: {
8396
8434
  end: "`",
@@ -8486,7 +8524,7 @@ function javascript$1(hljs) {
8486
8524
  const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([
8487
8525
  // eat recursive parens in sub expressions
8488
8526
  {
8489
- begin: /(\s*)\(/,
8527
+ begin: /\(/,
8490
8528
  end: /\)/,
8491
8529
  keywords: KEYWORDS$1$1,
8492
8530
  contains: ["self"].concat(SUBST_AND_COMMENTS)
@@ -8494,9 +8532,7 @@ function javascript$1(hljs) {
8494
8532
  ]);
8495
8533
  const PARAMS = {
8496
8534
  className: "params",
8497
- // convert this to negative lookbehind in v12
8498
- begin: /(\s*)\(/,
8499
- // to match the parms with
8535
+ begin: /\(/,
8500
8536
  end: /\)/,
8501
8537
  excludeBegin: true,
8502
8538
  excludeEnd: true,
@@ -8609,9 +8645,9 @@ function javascript$1(hljs) {
8609
8645
  ...BUILT_IN_GLOBALS$1,
8610
8646
  "super",
8611
8647
  "import"
8612
- ].map((x) => `${x}\\s*\\(`)),
8648
+ ]),
8613
8649
  IDENT_RE$1$1,
8614
- regex.lookahead(/\s*\(/)
8650
+ regex.lookahead(/\(/)
8615
8651
  ),
8616
8652
  className: "title.function",
8617
8653
  relevance: 0
@@ -8727,7 +8763,7 @@ function javascript$1(hljs) {
8727
8763
  skip: true
8728
8764
  },
8729
8765
  {
8730
- begin: /(\s*)\(/,
8766
+ begin: /\(/,
8731
8767
  end: /\)/,
8732
8768
  excludeBegin: true,
8733
8769
  excludeEnd: true,
@@ -8847,7 +8883,8 @@ var NUMERIC$1 = {
8847
8883
  relevance: 0
8848
8884
  };
8849
8885
  function recurRegex(re, substitution, depth) {
8850
- if (depth === -1) return "";
8886
+ if (depth === -1)
8887
+ return "";
8851
8888
  return re.replace(substitution, (_) => {
8852
8889
  return recurRegex(re, substitution, depth - 1);
8853
8890
  });
@@ -8898,8 +8935,7 @@ function java(hljs) {
8898
8935
  "do",
8899
8936
  "sealed",
8900
8937
  "yield",
8901
- "permits",
8902
- "goto"
8938
+ "permits"
8903
8939
  ];
8904
8940
  const BUILT_INS2 = [
8905
8941
  "super",
@@ -9312,7 +9348,7 @@ function javascript(hljs) {
9312
9348
  // defined later
9313
9349
  };
9314
9350
  const HTML_TEMPLATE = {
9315
- begin: ".?html`",
9351
+ begin: "html`",
9316
9352
  end: "",
9317
9353
  starts: {
9318
9354
  end: "`",
@@ -9325,7 +9361,7 @@ function javascript(hljs) {
9325
9361
  }
9326
9362
  };
9327
9363
  const CSS_TEMPLATE = {
9328
- begin: ".?css`",
9364
+ begin: "css`",
9329
9365
  end: "",
9330
9366
  starts: {
9331
9367
  end: "`",
@@ -9338,7 +9374,7 @@ function javascript(hljs) {
9338
9374
  }
9339
9375
  };
9340
9376
  const GRAPHQL_TEMPLATE = {
9341
- begin: ".?gql`",
9377
+ begin: "gql`",
9342
9378
  end: "",
9343
9379
  starts: {
9344
9380
  end: "`",
@@ -9434,7 +9470,7 @@ function javascript(hljs) {
9434
9470
  const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([
9435
9471
  // eat recursive parens in sub expressions
9436
9472
  {
9437
- begin: /(\s*)\(/,
9473
+ begin: /\(/,
9438
9474
  end: /\)/,
9439
9475
  keywords: KEYWORDS$12,
9440
9476
  contains: ["self"].concat(SUBST_AND_COMMENTS)
@@ -9442,9 +9478,7 @@ function javascript(hljs) {
9442
9478
  ]);
9443
9479
  const PARAMS = {
9444
9480
  className: "params",
9445
- // convert this to negative lookbehind in v12
9446
- begin: /(\s*)\(/,
9447
- // to match the parms with
9481
+ begin: /\(/,
9448
9482
  end: /\)/,
9449
9483
  excludeBegin: true,
9450
9484
  excludeEnd: true,
@@ -9557,9 +9591,9 @@ function javascript(hljs) {
9557
9591
  ...BUILT_IN_GLOBALS,
9558
9592
  "super",
9559
9593
  "import"
9560
- ].map((x) => `${x}\\s*\\(`)),
9594
+ ]),
9561
9595
  IDENT_RE$12,
9562
- regex.lookahead(/\s*\(/)
9596
+ regex.lookahead(/\(/)
9563
9597
  ),
9564
9598
  className: "title.function",
9565
9599
  relevance: 0
@@ -9675,7 +9709,7 @@ function javascript(hljs) {
9675
9709
  skip: true
9676
9710
  },
9677
9711
  {
9678
- begin: /(\s*)\(/,
9712
+ begin: /\(/,
9679
9713
  end: /\)/,
9680
9714
  excludeBegin: true,
9681
9715
  excludeEnd: true,
@@ -9784,15 +9818,10 @@ function typescript(hljs) {
9784
9818
  "unknown"
9785
9819
  ];
9786
9820
  const NAMESPACE = {
9787
- begin: [
9788
- /namespace/,
9789
- /\s+/,
9790
- hljs.IDENT_RE
9791
- ],
9792
- beginScope: {
9793
- 1: "keyword",
9794
- 3: "title.class"
9795
- }
9821
+ beginKeywords: "namespace",
9822
+ end: /\{/,
9823
+ excludeEnd: true,
9824
+ contains: [tsLanguage.exports.CLASS_REFERENCE]
9796
9825
  };
9797
9826
  const INTERFACE = {
9798
9827
  beginKeywords: "interface",
@@ -9811,7 +9840,7 @@ function typescript(hljs) {
9811
9840
  };
9812
9841
  const TS_SPECIFIC_KEYWORDS = [
9813
9842
  "type",
9814
- // "namespace",
9843
+ "namespace",
9815
9844
  "interface",
9816
9845
  "public",
9817
9846
  "private",
@@ -9821,8 +9850,7 @@ function typescript(hljs) {
9821
9850
  "abstract",
9822
9851
  "readonly",
9823
9852
  "enum",
9824
- "override",
9825
- "satisfies"
9853
+ "override"
9826
9854
  ];
9827
9855
  const KEYWORDS$12 = {
9828
9856
  $pattern: IDENT_RE,
@@ -9844,13 +9872,6 @@ function typescript(hljs) {
9844
9872
  };
9845
9873
  Object.assign(tsLanguage.keywords, KEYWORDS$12);
9846
9874
  tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);
9847
- const ATTRIBUTE_HIGHLIGHT = tsLanguage.contains.find((c2) => c2.className === "attr");
9848
- tsLanguage.exports.PARAMS_CONTAINS.push([
9849
- tsLanguage.exports.CLASS_REFERENCE,
9850
- // class reference for highlighting the params types
9851
- ATTRIBUTE_HIGHLIGHT
9852
- // highlight the params key
9853
- ]);
9854
9875
  tsLanguage.contains = tsLanguage.contains.concat([
9855
9876
  DECORATOR,
9856
9877
  NAMESPACE,
@@ -10219,8 +10240,7 @@ function python(hljs) {
10219
10240
  NUMBER,
10220
10241
  {
10221
10242
  // very common convention
10222
- scope: "variable.language",
10223
- match: /\bself\b/
10243
+ begin: /\bself\b/
10224
10244
  },
10225
10245
  {
10226
10246
  // eat "if" prior to string so that it won't accidentally be
@@ -10228,7 +10248,6 @@ function python(hljs) {
10228
10248
  beginKeywords: "if",
10229
10249
  relevance: 0
10230
10250
  },
10231
- { match: /\bor\b/, scope: "keyword" },
10232
10251
  STRING,
10233
10252
  COMMENT_TYPE,
10234
10253
  hljs.HASH_COMMENT_MODE,
@@ -10334,7 +10353,8 @@ function php(hljs) {
10334
10353
  resp.data._beginMatch = m[1] || m[2];
10335
10354
  },
10336
10355
  "on:end": (m, resp) => {
10337
- if (resp.data._beginMatch !== m[1]) resp.ignoreMatch();
10356
+ if (resp.data._beginMatch !== m[1])
10357
+ resp.ignoreMatch();
10338
10358
  }
10339
10359
  };
10340
10360
  const NOWDOC = hljs.END_SAME_AS_BEGIN({
@@ -10905,7 +10925,7 @@ const MODES$2 = (hljs) => {
10905
10925
  }
10906
10926
  };
10907
10927
  };
10908
- const HTML_TAGS$2 = [
10928
+ const TAGS$2 = [
10909
10929
  "a",
10910
10930
  "abbr",
10911
10931
  "address",
@@ -10957,16 +10977,11 @@ const HTML_TAGS$2 = [
10957
10977
  "nav",
10958
10978
  "object",
10959
10979
  "ol",
10960
- "optgroup",
10961
- "option",
10962
10980
  "p",
10963
- "picture",
10964
10981
  "q",
10965
10982
  "quote",
10966
10983
  "samp",
10967
10984
  "section",
10968
- "select",
10969
- "source",
10970
10985
  "span",
10971
10986
  "strong",
10972
10987
  "summary",
@@ -10984,53 +10999,6 @@ const HTML_TAGS$2 = [
10984
10999
  "var",
10985
11000
  "video"
10986
11001
  ];
10987
- const SVG_TAGS$2 = [
10988
- "defs",
10989
- "g",
10990
- "marker",
10991
- "mask",
10992
- "pattern",
10993
- "svg",
10994
- "switch",
10995
- "symbol",
10996
- "feBlend",
10997
- "feColorMatrix",
10998
- "feComponentTransfer",
10999
- "feComposite",
11000
- "feConvolveMatrix",
11001
- "feDiffuseLighting",
11002
- "feDisplacementMap",
11003
- "feFlood",
11004
- "feGaussianBlur",
11005
- "feImage",
11006
- "feMerge",
11007
- "feMorphology",
11008
- "feOffset",
11009
- "feSpecularLighting",
11010
- "feTile",
11011
- "feTurbulence",
11012
- "linearGradient",
11013
- "radialGradient",
11014
- "stop",
11015
- "circle",
11016
- "ellipse",
11017
- "image",
11018
- "line",
11019
- "path",
11020
- "polygon",
11021
- "polyline",
11022
- "rect",
11023
- "text",
11024
- "use",
11025
- "textPath",
11026
- "tspan",
11027
- "foreignObject",
11028
- "clipPath"
11029
- ];
11030
- const TAGS$2 = [
11031
- ...HTML_TAGS$2,
11032
- ...SVG_TAGS$2
11033
- ];
11034
11002
  const MEDIA_FEATURES$2 = [
11035
11003
  "any-hover",
11036
11004
  "any-pointer",
@@ -11066,7 +11034,7 @@ const MEDIA_FEATURES$2 = [
11066
11034
  "max-width",
11067
11035
  "min-height",
11068
11036
  "max-height"
11069
- ].sort().reverse();
11037
+ ];
11070
11038
  const PSEUDO_CLASSES$2 = [
11071
11039
  "active",
11072
11040
  "any-link",
@@ -11141,7 +11109,7 @@ const PSEUDO_CLASSES$2 = [
11141
11109
  "visited",
11142
11110
  "where"
11143
11111
  // where()
11144
- ].sort().reverse();
11112
+ ];
11145
11113
  const PSEUDO_ELEMENTS$2 = [
11146
11114
  "after",
11147
11115
  "backdrop",
@@ -11157,13 +11125,11 @@ const PSEUDO_ELEMENTS$2 = [
11157
11125
  "selection",
11158
11126
  "slotted",
11159
11127
  "spelling-error"
11160
- ].sort().reverse();
11128
+ ];
11161
11129
  const ATTRIBUTES$2 = [
11162
- "accent-color",
11163
11130
  "align-content",
11164
11131
  "align-items",
11165
11132
  "align-self",
11166
- "alignment-baseline",
11167
11133
  "all",
11168
11134
  "animation",
11169
11135
  "animation-delay",
@@ -11174,7 +11140,6 @@ const ATTRIBUTES$2 = [
11174
11140
  "animation-name",
11175
11141
  "animation-play-state",
11176
11142
  "animation-timing-function",
11177
- "appearance",
11178
11143
  "backface-visibility",
11179
11144
  "background",
11180
11145
  "background-attachment",
@@ -11186,7 +11151,6 @@ const ATTRIBUTES$2 = [
11186
11151
  "background-position",
11187
11152
  "background-repeat",
11188
11153
  "background-size",
11189
- "baseline-shift",
11190
11154
  "block-size",
11191
11155
  "border",
11192
11156
  "border-block",
@@ -11233,14 +11197,10 @@ const ATTRIBUTES$2 = [
11233
11197
  "border-left-width",
11234
11198
  "border-radius",
11235
11199
  "border-right",
11236
- "border-end-end-radius",
11237
- "border-end-start-radius",
11238
11200
  "border-right-color",
11239
11201
  "border-right-style",
11240
11202
  "border-right-width",
11241
11203
  "border-spacing",
11242
- "border-start-end-radius",
11243
- "border-start-start-radius",
11244
11204
  "border-style",
11245
11205
  "border-top",
11246
11206
  "border-top-color",
@@ -11256,8 +11216,6 @@ const ATTRIBUTES$2 = [
11256
11216
  "break-after",
11257
11217
  "break-before",
11258
11218
  "break-inside",
11259
- "cx",
11260
- "cy",
11261
11219
  "caption-side",
11262
11220
  "caret-color",
11263
11221
  "clear",
@@ -11265,11 +11223,6 @@ const ATTRIBUTES$2 = [
11265
11223
  "clip-path",
11266
11224
  "clip-rule",
11267
11225
  "color",
11268
- "color-interpolation",
11269
- "color-interpolation-filters",
11270
- "color-profile",
11271
- "color-rendering",
11272
- "color-scheme",
11273
11226
  "column-count",
11274
11227
  "column-fill",
11275
11228
  "column-gap",
@@ -11291,12 +11244,7 @@ const ATTRIBUTES$2 = [
11291
11244
  "cursor",
11292
11245
  "direction",
11293
11246
  "display",
11294
- "dominant-baseline",
11295
11247
  "empty-cells",
11296
- "enable-background",
11297
- "fill",
11298
- "fill-opacity",
11299
- "fill-rule",
11300
11248
  "filter",
11301
11249
  "flex",
11302
11250
  "flex-basis",
@@ -11307,8 +11255,6 @@ const ATTRIBUTES$2 = [
11307
11255
  "flex-wrap",
11308
11256
  "float",
11309
11257
  "flow",
11310
- "flood-color",
11311
- "flood-opacity",
11312
11258
  "font",
11313
11259
  "font-display",
11314
11260
  "font-family",
@@ -11330,7 +11276,6 @@ const ATTRIBUTES$2 = [
11330
11276
  "font-variation-settings",
11331
11277
  "font-weight",
11332
11278
  "gap",
11333
- "glyph-orientation-horizontal",
11334
11279
  "glyph-orientation-vertical",
11335
11280
  "grid",
11336
11281
  "grid-area",
@@ -11357,32 +11302,16 @@ const ATTRIBUTES$2 = [
11357
11302
  "image-resolution",
11358
11303
  "ime-mode",
11359
11304
  "inline-size",
11360
- "inset",
11361
- "inset-block",
11362
- "inset-block-end",
11363
- "inset-block-start",
11364
- "inset-inline",
11365
- "inset-inline-end",
11366
- "inset-inline-start",
11367
11305
  "isolation",
11368
- "kerning",
11369
11306
  "justify-content",
11370
- "justify-items",
11371
- "justify-self",
11372
11307
  "left",
11373
11308
  "letter-spacing",
11374
- "lighting-color",
11375
11309
  "line-break",
11376
11310
  "line-height",
11377
11311
  "list-style",
11378
11312
  "list-style-image",
11379
11313
  "list-style-position",
11380
11314
  "list-style-type",
11381
- "marker",
11382
- "marker-end",
11383
- "marker-mid",
11384
- "marker-start",
11385
- "mask",
11386
11315
  "margin",
11387
11316
  "margin-block",
11388
11317
  "margin-block-end",
@@ -11464,15 +11393,12 @@ const ATTRIBUTES$2 = [
11464
11393
  "pointer-events",
11465
11394
  "position",
11466
11395
  "quotes",
11467
- "r",
11468
11396
  "resize",
11469
11397
  "rest",
11470
11398
  "rest-after",
11471
11399
  "rest-before",
11472
11400
  "right",
11473
- "rotate",
11474
11401
  "row-gap",
11475
- "scale",
11476
11402
  "scroll-margin",
11477
11403
  "scroll-margin-block",
11478
11404
  "scroll-margin-block-end",
@@ -11504,24 +11430,12 @@ const ATTRIBUTES$2 = [
11504
11430
  "shape-image-threshold",
11505
11431
  "shape-margin",
11506
11432
  "shape-outside",
11507
- "shape-rendering",
11508
- "stop-color",
11509
- "stop-opacity",
11510
- "stroke",
11511
- "stroke-dasharray",
11512
- "stroke-dashoffset",
11513
- "stroke-linecap",
11514
- "stroke-linejoin",
11515
- "stroke-miterlimit",
11516
- "stroke-opacity",
11517
- "stroke-width",
11518
11433
  "speak",
11519
11434
  "speak-as",
11520
11435
  "src",
11521
11436
  // @font-face
11522
11437
  "tab-size",
11523
11438
  "table-layout",
11524
- "text-anchor",
11525
11439
  "text-align",
11526
11440
  "text-align-all",
11527
11441
  "text-align-last",
@@ -11529,9 +11443,7 @@ const ATTRIBUTES$2 = [
11529
11443
  "text-decoration",
11530
11444
  "text-decoration-color",
11531
11445
  "text-decoration-line",
11532
- "text-decoration-skip-ink",
11533
11446
  "text-decoration-style",
11534
- "text-decoration-thickness",
11535
11447
  "text-emphasis",
11536
11448
  "text-emphasis-color",
11537
11449
  "text-emphasis-position",
@@ -11543,7 +11455,6 @@ const ATTRIBUTES$2 = [
11543
11455
  "text-rendering",
11544
11456
  "text-shadow",
11545
11457
  "text-transform",
11546
- "text-underline-offset",
11547
11458
  "text-underline-position",
11548
11459
  "top",
11549
11460
  "transform",
@@ -11555,9 +11466,7 @@ const ATTRIBUTES$2 = [
11555
11466
  "transition-duration",
11556
11467
  "transition-property",
11557
11468
  "transition-timing-function",
11558
- "translate",
11559
11469
  "unicode-bidi",
11560
- "vector-effect",
11561
11470
  "vertical-align",
11562
11471
  "visibility",
11563
11472
  "voice-balance",
@@ -11576,10 +11485,10 @@ const ATTRIBUTES$2 = [
11576
11485
  "word-spacing",
11577
11486
  "word-wrap",
11578
11487
  "writing-mode",
11579
- "x",
11580
- "y",
11581
11488
  "z-index"
11582
- ].sort().reverse();
11489
+ // reverse makes sure longer attributes `font-weight` are matched fully
11490
+ // instead of getting false positives on say `font`
11491
+ ].reverse();
11583
11492
  function css(hljs) {
11584
11493
  const regex = hljs.regex;
11585
11494
  const modes = MODES$2(hljs);
@@ -11745,7 +11654,7 @@ const MODES$1 = (hljs) => {
11745
11654
  }
11746
11655
  };
11747
11656
  };
11748
- const HTML_TAGS$1 = [
11657
+ const TAGS$1 = [
11749
11658
  "a",
11750
11659
  "abbr",
11751
11660
  "address",
@@ -11797,16 +11706,11 @@ const HTML_TAGS$1 = [
11797
11706
  "nav",
11798
11707
  "object",
11799
11708
  "ol",
11800
- "optgroup",
11801
- "option",
11802
11709
  "p",
11803
- "picture",
11804
11710
  "q",
11805
11711
  "quote",
11806
11712
  "samp",
11807
11713
  "section",
11808
- "select",
11809
- "source",
11810
11714
  "span",
11811
11715
  "strong",
11812
11716
  "summary",
@@ -11824,53 +11728,6 @@ const HTML_TAGS$1 = [
11824
11728
  "var",
11825
11729
  "video"
11826
11730
  ];
11827
- const SVG_TAGS$1 = [
11828
- "defs",
11829
- "g",
11830
- "marker",
11831
- "mask",
11832
- "pattern",
11833
- "svg",
11834
- "switch",
11835
- "symbol",
11836
- "feBlend",
11837
- "feColorMatrix",
11838
- "feComponentTransfer",
11839
- "feComposite",
11840
- "feConvolveMatrix",
11841
- "feDiffuseLighting",
11842
- "feDisplacementMap",
11843
- "feFlood",
11844
- "feGaussianBlur",
11845
- "feImage",
11846
- "feMerge",
11847
- "feMorphology",
11848
- "feOffset",
11849
- "feSpecularLighting",
11850
- "feTile",
11851
- "feTurbulence",
11852
- "linearGradient",
11853
- "radialGradient",
11854
- "stop",
11855
- "circle",
11856
- "ellipse",
11857
- "image",
11858
- "line",
11859
- "path",
11860
- "polygon",
11861
- "polyline",
11862
- "rect",
11863
- "text",
11864
- "use",
11865
- "textPath",
11866
- "tspan",
11867
- "foreignObject",
11868
- "clipPath"
11869
- ];
11870
- const TAGS$1 = [
11871
- ...HTML_TAGS$1,
11872
- ...SVG_TAGS$1
11873
- ];
11874
11731
  const MEDIA_FEATURES$1 = [
11875
11732
  "any-hover",
11876
11733
  "any-pointer",
@@ -11906,7 +11763,7 @@ const MEDIA_FEATURES$1 = [
11906
11763
  "max-width",
11907
11764
  "min-height",
11908
11765
  "max-height"
11909
- ].sort().reverse();
11766
+ ];
11910
11767
  const PSEUDO_CLASSES$1 = [
11911
11768
  "active",
11912
11769
  "any-link",
@@ -11981,7 +11838,7 @@ const PSEUDO_CLASSES$1 = [
11981
11838
  "visited",
11982
11839
  "where"
11983
11840
  // where()
11984
- ].sort().reverse();
11841
+ ];
11985
11842
  const PSEUDO_ELEMENTS$1 = [
11986
11843
  "after",
11987
11844
  "backdrop",
@@ -11997,13 +11854,11 @@ const PSEUDO_ELEMENTS$1 = [
11997
11854
  "selection",
11998
11855
  "slotted",
11999
11856
  "spelling-error"
12000
- ].sort().reverse();
11857
+ ];
12001
11858
  const ATTRIBUTES$1 = [
12002
- "accent-color",
12003
11859
  "align-content",
12004
11860
  "align-items",
12005
11861
  "align-self",
12006
- "alignment-baseline",
12007
11862
  "all",
12008
11863
  "animation",
12009
11864
  "animation-delay",
@@ -12014,7 +11869,6 @@ const ATTRIBUTES$1 = [
12014
11869
  "animation-name",
12015
11870
  "animation-play-state",
12016
11871
  "animation-timing-function",
12017
- "appearance",
12018
11872
  "backface-visibility",
12019
11873
  "background",
12020
11874
  "background-attachment",
@@ -12026,7 +11880,6 @@ const ATTRIBUTES$1 = [
12026
11880
  "background-position",
12027
11881
  "background-repeat",
12028
11882
  "background-size",
12029
- "baseline-shift",
12030
11883
  "block-size",
12031
11884
  "border",
12032
11885
  "border-block",
@@ -12073,14 +11926,10 @@ const ATTRIBUTES$1 = [
12073
11926
  "border-left-width",
12074
11927
  "border-radius",
12075
11928
  "border-right",
12076
- "border-end-end-radius",
12077
- "border-end-start-radius",
12078
11929
  "border-right-color",
12079
11930
  "border-right-style",
12080
11931
  "border-right-width",
12081
11932
  "border-spacing",
12082
- "border-start-end-radius",
12083
- "border-start-start-radius",
12084
11933
  "border-style",
12085
11934
  "border-top",
12086
11935
  "border-top-color",
@@ -12096,8 +11945,6 @@ const ATTRIBUTES$1 = [
12096
11945
  "break-after",
12097
11946
  "break-before",
12098
11947
  "break-inside",
12099
- "cx",
12100
- "cy",
12101
11948
  "caption-side",
12102
11949
  "caret-color",
12103
11950
  "clear",
@@ -12105,11 +11952,6 @@ const ATTRIBUTES$1 = [
12105
11952
  "clip-path",
12106
11953
  "clip-rule",
12107
11954
  "color",
12108
- "color-interpolation",
12109
- "color-interpolation-filters",
12110
- "color-profile",
12111
- "color-rendering",
12112
- "color-scheme",
12113
11955
  "column-count",
12114
11956
  "column-fill",
12115
11957
  "column-gap",
@@ -12131,12 +11973,7 @@ const ATTRIBUTES$1 = [
12131
11973
  "cursor",
12132
11974
  "direction",
12133
11975
  "display",
12134
- "dominant-baseline",
12135
11976
  "empty-cells",
12136
- "enable-background",
12137
- "fill",
12138
- "fill-opacity",
12139
- "fill-rule",
12140
11977
  "filter",
12141
11978
  "flex",
12142
11979
  "flex-basis",
@@ -12147,8 +11984,6 @@ const ATTRIBUTES$1 = [
12147
11984
  "flex-wrap",
12148
11985
  "float",
12149
11986
  "flow",
12150
- "flood-color",
12151
- "flood-opacity",
12152
11987
  "font",
12153
11988
  "font-display",
12154
11989
  "font-family",
@@ -12170,7 +12005,6 @@ const ATTRIBUTES$1 = [
12170
12005
  "font-variation-settings",
12171
12006
  "font-weight",
12172
12007
  "gap",
12173
- "glyph-orientation-horizontal",
12174
12008
  "glyph-orientation-vertical",
12175
12009
  "grid",
12176
12010
  "grid-area",
@@ -12197,32 +12031,16 @@ const ATTRIBUTES$1 = [
12197
12031
  "image-resolution",
12198
12032
  "ime-mode",
12199
12033
  "inline-size",
12200
- "inset",
12201
- "inset-block",
12202
- "inset-block-end",
12203
- "inset-block-start",
12204
- "inset-inline",
12205
- "inset-inline-end",
12206
- "inset-inline-start",
12207
12034
  "isolation",
12208
- "kerning",
12209
12035
  "justify-content",
12210
- "justify-items",
12211
- "justify-self",
12212
12036
  "left",
12213
12037
  "letter-spacing",
12214
- "lighting-color",
12215
12038
  "line-break",
12216
12039
  "line-height",
12217
12040
  "list-style",
12218
12041
  "list-style-image",
12219
12042
  "list-style-position",
12220
12043
  "list-style-type",
12221
- "marker",
12222
- "marker-end",
12223
- "marker-mid",
12224
- "marker-start",
12225
- "mask",
12226
12044
  "margin",
12227
12045
  "margin-block",
12228
12046
  "margin-block-end",
@@ -12304,15 +12122,12 @@ const ATTRIBUTES$1 = [
12304
12122
  "pointer-events",
12305
12123
  "position",
12306
12124
  "quotes",
12307
- "r",
12308
12125
  "resize",
12309
12126
  "rest",
12310
12127
  "rest-after",
12311
12128
  "rest-before",
12312
12129
  "right",
12313
- "rotate",
12314
12130
  "row-gap",
12315
- "scale",
12316
12131
  "scroll-margin",
12317
12132
  "scroll-margin-block",
12318
12133
  "scroll-margin-block-end",
@@ -12344,24 +12159,12 @@ const ATTRIBUTES$1 = [
12344
12159
  "shape-image-threshold",
12345
12160
  "shape-margin",
12346
12161
  "shape-outside",
12347
- "shape-rendering",
12348
- "stop-color",
12349
- "stop-opacity",
12350
- "stroke",
12351
- "stroke-dasharray",
12352
- "stroke-dashoffset",
12353
- "stroke-linecap",
12354
- "stroke-linejoin",
12355
- "stroke-miterlimit",
12356
- "stroke-opacity",
12357
- "stroke-width",
12358
12162
  "speak",
12359
12163
  "speak-as",
12360
12164
  "src",
12361
12165
  // @font-face
12362
12166
  "tab-size",
12363
12167
  "table-layout",
12364
- "text-anchor",
12365
12168
  "text-align",
12366
12169
  "text-align-all",
12367
12170
  "text-align-last",
@@ -12369,9 +12172,7 @@ const ATTRIBUTES$1 = [
12369
12172
  "text-decoration",
12370
12173
  "text-decoration-color",
12371
12174
  "text-decoration-line",
12372
- "text-decoration-skip-ink",
12373
12175
  "text-decoration-style",
12374
- "text-decoration-thickness",
12375
12176
  "text-emphasis",
12376
12177
  "text-emphasis-color",
12377
12178
  "text-emphasis-position",
@@ -12383,7 +12184,6 @@ const ATTRIBUTES$1 = [
12383
12184
  "text-rendering",
12384
12185
  "text-shadow",
12385
12186
  "text-transform",
12386
- "text-underline-offset",
12387
12187
  "text-underline-position",
12388
12188
  "top",
12389
12189
  "transform",
@@ -12395,9 +12195,7 @@ const ATTRIBUTES$1 = [
12395
12195
  "transition-duration",
12396
12196
  "transition-property",
12397
12197
  "transition-timing-function",
12398
- "translate",
12399
12198
  "unicode-bidi",
12400
- "vector-effect",
12401
12199
  "vertical-align",
12402
12200
  "visibility",
12403
12201
  "voice-balance",
@@ -12416,11 +12214,11 @@ const ATTRIBUTES$1 = [
12416
12214
  "word-spacing",
12417
12215
  "word-wrap",
12418
12216
  "writing-mode",
12419
- "x",
12420
- "y",
12421
12217
  "z-index"
12422
- ].sort().reverse();
12423
- const PSEUDO_SELECTORS = PSEUDO_CLASSES$1.concat(PSEUDO_ELEMENTS$1).sort().reverse();
12218
+ // reverse makes sure longer attributes `font-weight` are matched fully
12219
+ // instead of getting false positives on say `font`
12220
+ ].reverse();
12221
+ const PSEUDO_SELECTORS = PSEUDO_CLASSES$1.concat(PSEUDO_ELEMENTS$1);
12424
12222
  function less(hljs) {
12425
12223
  const modes = MODES$1(hljs);
12426
12224
  const PSEUDO_SELECTORS$1 = PSEUDO_SELECTORS;
@@ -12666,7 +12464,7 @@ const MODES = (hljs) => {
12666
12464
  }
12667
12465
  };
12668
12466
  };
12669
- const HTML_TAGS = [
12467
+ const TAGS = [
12670
12468
  "a",
12671
12469
  "abbr",
12672
12470
  "address",
@@ -12718,16 +12516,11 @@ const HTML_TAGS = [
12718
12516
  "nav",
12719
12517
  "object",
12720
12518
  "ol",
12721
- "optgroup",
12722
- "option",
12723
12519
  "p",
12724
- "picture",
12725
12520
  "q",
12726
12521
  "quote",
12727
12522
  "samp",
12728
12523
  "section",
12729
- "select",
12730
- "source",
12731
12524
  "span",
12732
12525
  "strong",
12733
12526
  "summary",
@@ -12745,53 +12538,6 @@ const HTML_TAGS = [
12745
12538
  "var",
12746
12539
  "video"
12747
12540
  ];
12748
- const SVG_TAGS = [
12749
- "defs",
12750
- "g",
12751
- "marker",
12752
- "mask",
12753
- "pattern",
12754
- "svg",
12755
- "switch",
12756
- "symbol",
12757
- "feBlend",
12758
- "feColorMatrix",
12759
- "feComponentTransfer",
12760
- "feComposite",
12761
- "feConvolveMatrix",
12762
- "feDiffuseLighting",
12763
- "feDisplacementMap",
12764
- "feFlood",
12765
- "feGaussianBlur",
12766
- "feImage",
12767
- "feMerge",
12768
- "feMorphology",
12769
- "feOffset",
12770
- "feSpecularLighting",
12771
- "feTile",
12772
- "feTurbulence",
12773
- "linearGradient",
12774
- "radialGradient",
12775
- "stop",
12776
- "circle",
12777
- "ellipse",
12778
- "image",
12779
- "line",
12780
- "path",
12781
- "polygon",
12782
- "polyline",
12783
- "rect",
12784
- "text",
12785
- "use",
12786
- "textPath",
12787
- "tspan",
12788
- "foreignObject",
12789
- "clipPath"
12790
- ];
12791
- const TAGS = [
12792
- ...HTML_TAGS,
12793
- ...SVG_TAGS
12794
- ];
12795
12541
  const MEDIA_FEATURES = [
12796
12542
  "any-hover",
12797
12543
  "any-pointer",
@@ -12827,7 +12573,7 @@ const MEDIA_FEATURES = [
12827
12573
  "max-width",
12828
12574
  "min-height",
12829
12575
  "max-height"
12830
- ].sort().reverse();
12576
+ ];
12831
12577
  const PSEUDO_CLASSES = [
12832
12578
  "active",
12833
12579
  "any-link",
@@ -12902,7 +12648,7 @@ const PSEUDO_CLASSES = [
12902
12648
  "visited",
12903
12649
  "where"
12904
12650
  // where()
12905
- ].sort().reverse();
12651
+ ];
12906
12652
  const PSEUDO_ELEMENTS = [
12907
12653
  "after",
12908
12654
  "backdrop",
@@ -12918,13 +12664,11 @@ const PSEUDO_ELEMENTS = [
12918
12664
  "selection",
12919
12665
  "slotted",
12920
12666
  "spelling-error"
12921
- ].sort().reverse();
12667
+ ];
12922
12668
  const ATTRIBUTES = [
12923
- "accent-color",
12924
12669
  "align-content",
12925
12670
  "align-items",
12926
12671
  "align-self",
12927
- "alignment-baseline",
12928
12672
  "all",
12929
12673
  "animation",
12930
12674
  "animation-delay",
@@ -12935,7 +12679,6 @@ const ATTRIBUTES = [
12935
12679
  "animation-name",
12936
12680
  "animation-play-state",
12937
12681
  "animation-timing-function",
12938
- "appearance",
12939
12682
  "backface-visibility",
12940
12683
  "background",
12941
12684
  "background-attachment",
@@ -12947,7 +12690,6 @@ const ATTRIBUTES = [
12947
12690
  "background-position",
12948
12691
  "background-repeat",
12949
12692
  "background-size",
12950
- "baseline-shift",
12951
12693
  "block-size",
12952
12694
  "border",
12953
12695
  "border-block",
@@ -12994,14 +12736,10 @@ const ATTRIBUTES = [
12994
12736
  "border-left-width",
12995
12737
  "border-radius",
12996
12738
  "border-right",
12997
- "border-end-end-radius",
12998
- "border-end-start-radius",
12999
12739
  "border-right-color",
13000
12740
  "border-right-style",
13001
12741
  "border-right-width",
13002
12742
  "border-spacing",
13003
- "border-start-end-radius",
13004
- "border-start-start-radius",
13005
12743
  "border-style",
13006
12744
  "border-top",
13007
12745
  "border-top-color",
@@ -13017,8 +12755,6 @@ const ATTRIBUTES = [
13017
12755
  "break-after",
13018
12756
  "break-before",
13019
12757
  "break-inside",
13020
- "cx",
13021
- "cy",
13022
12758
  "caption-side",
13023
12759
  "caret-color",
13024
12760
  "clear",
@@ -13026,11 +12762,6 @@ const ATTRIBUTES = [
13026
12762
  "clip-path",
13027
12763
  "clip-rule",
13028
12764
  "color",
13029
- "color-interpolation",
13030
- "color-interpolation-filters",
13031
- "color-profile",
13032
- "color-rendering",
13033
- "color-scheme",
13034
12765
  "column-count",
13035
12766
  "column-fill",
13036
12767
  "column-gap",
@@ -13052,12 +12783,7 @@ const ATTRIBUTES = [
13052
12783
  "cursor",
13053
12784
  "direction",
13054
12785
  "display",
13055
- "dominant-baseline",
13056
12786
  "empty-cells",
13057
- "enable-background",
13058
- "fill",
13059
- "fill-opacity",
13060
- "fill-rule",
13061
12787
  "filter",
13062
12788
  "flex",
13063
12789
  "flex-basis",
@@ -13068,8 +12794,6 @@ const ATTRIBUTES = [
13068
12794
  "flex-wrap",
13069
12795
  "float",
13070
12796
  "flow",
13071
- "flood-color",
13072
- "flood-opacity",
13073
12797
  "font",
13074
12798
  "font-display",
13075
12799
  "font-family",
@@ -13091,7 +12815,6 @@ const ATTRIBUTES = [
13091
12815
  "font-variation-settings",
13092
12816
  "font-weight",
13093
12817
  "gap",
13094
- "glyph-orientation-horizontal",
13095
12818
  "glyph-orientation-vertical",
13096
12819
  "grid",
13097
12820
  "grid-area",
@@ -13118,32 +12841,16 @@ const ATTRIBUTES = [
13118
12841
  "image-resolution",
13119
12842
  "ime-mode",
13120
12843
  "inline-size",
13121
- "inset",
13122
- "inset-block",
13123
- "inset-block-end",
13124
- "inset-block-start",
13125
- "inset-inline",
13126
- "inset-inline-end",
13127
- "inset-inline-start",
13128
12844
  "isolation",
13129
- "kerning",
13130
12845
  "justify-content",
13131
- "justify-items",
13132
- "justify-self",
13133
12846
  "left",
13134
12847
  "letter-spacing",
13135
- "lighting-color",
13136
12848
  "line-break",
13137
12849
  "line-height",
13138
12850
  "list-style",
13139
12851
  "list-style-image",
13140
12852
  "list-style-position",
13141
12853
  "list-style-type",
13142
- "marker",
13143
- "marker-end",
13144
- "marker-mid",
13145
- "marker-start",
13146
- "mask",
13147
12854
  "margin",
13148
12855
  "margin-block",
13149
12856
  "margin-block-end",
@@ -13225,15 +12932,12 @@ const ATTRIBUTES = [
13225
12932
  "pointer-events",
13226
12933
  "position",
13227
12934
  "quotes",
13228
- "r",
13229
12935
  "resize",
13230
12936
  "rest",
13231
12937
  "rest-after",
13232
12938
  "rest-before",
13233
12939
  "right",
13234
- "rotate",
13235
12940
  "row-gap",
13236
- "scale",
13237
12941
  "scroll-margin",
13238
12942
  "scroll-margin-block",
13239
12943
  "scroll-margin-block-end",
@@ -13265,24 +12969,12 @@ const ATTRIBUTES = [
13265
12969
  "shape-image-threshold",
13266
12970
  "shape-margin",
13267
12971
  "shape-outside",
13268
- "shape-rendering",
13269
- "stop-color",
13270
- "stop-opacity",
13271
- "stroke",
13272
- "stroke-dasharray",
13273
- "stroke-dashoffset",
13274
- "stroke-linecap",
13275
- "stroke-linejoin",
13276
- "stroke-miterlimit",
13277
- "stroke-opacity",
13278
- "stroke-width",
13279
12972
  "speak",
13280
12973
  "speak-as",
13281
12974
  "src",
13282
12975
  // @font-face
13283
12976
  "tab-size",
13284
12977
  "table-layout",
13285
- "text-anchor",
13286
12978
  "text-align",
13287
12979
  "text-align-all",
13288
12980
  "text-align-last",
@@ -13290,9 +12982,7 @@ const ATTRIBUTES = [
13290
12982
  "text-decoration",
13291
12983
  "text-decoration-color",
13292
12984
  "text-decoration-line",
13293
- "text-decoration-skip-ink",
13294
12985
  "text-decoration-style",
13295
- "text-decoration-thickness",
13296
12986
  "text-emphasis",
13297
12987
  "text-emphasis-color",
13298
12988
  "text-emphasis-position",
@@ -13304,7 +12994,6 @@ const ATTRIBUTES = [
13304
12994
  "text-rendering",
13305
12995
  "text-shadow",
13306
12996
  "text-transform",
13307
- "text-underline-offset",
13308
12997
  "text-underline-position",
13309
12998
  "top",
13310
12999
  "transform",
@@ -13316,9 +13005,7 @@ const ATTRIBUTES = [
13316
13005
  "transition-duration",
13317
13006
  "transition-property",
13318
13007
  "transition-timing-function",
13319
- "translate",
13320
13008
  "unicode-bidi",
13321
- "vector-effect",
13322
13009
  "vertical-align",
13323
13010
  "visibility",
13324
13011
  "voice-balance",
@@ -13337,10 +13024,10 @@ const ATTRIBUTES = [
13337
13024
  "word-spacing",
13338
13025
  "word-wrap",
13339
13026
  "writing-mode",
13340
- "x",
13341
- "y",
13342
13027
  "z-index"
13343
- ].sort().reverse();
13028
+ // reverse makes sure longer attributes `font-weight` are matched fully
13029
+ // instead of getting false positives on say `font`
13030
+ ].reverse();
13344
13031
  function scss(hljs) {
13345
13032
  const modes = MODES(hljs);
13346
13033
  const PSEUDO_ELEMENTS$12 = PSEUDO_ELEMENTS;
@@ -13882,11 +13569,6 @@ function markdown(hljs) {
13882
13569
  contains: CONTAINABLE,
13883
13570
  end: "$"
13884
13571
  };
13885
- const ENTITY = {
13886
- //https://spec.commonmark.org/0.31.2/#entity-references
13887
- scope: "literal",
13888
- match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/
13889
- };
13890
13572
  return {
13891
13573
  name: "Markdown",
13892
13574
  aliases: [
@@ -13904,8 +13586,7 @@ function markdown(hljs) {
13904
13586
  CODE,
13905
13587
  HORIZONTAL_RULE,
13906
13588
  LINK,
13907
- LINK_REFERENCE,
13908
- ENTITY
13589
+ LINK_REFERENCE
13909
13590
  ]
13910
13591
  };
13911
13592
  }
@@ -14151,8 +13832,10 @@ function objectivec(hljs) {
14151
13832
  };
14152
13833
  }
14153
13834
  function source(re) {
14154
- if (!re) return null;
14155
- if (typeof re === "string") return re;
13835
+ if (!re)
13836
+ return null;
13837
+ if (typeof re === "string")
13838
+ return re;
14156
13839
  return re.source;
14157
13840
  }
14158
13841
  function lookahead(re) {
@@ -14284,7 +13967,6 @@ const keywords = [
14284
13967
  // contextual
14285
13968
  "override",
14286
13969
  // contextual
14287
- "package",
14288
13970
  "postfix",
14289
13971
  // contextual
14290
13972
  "precedencegroup",
@@ -14727,7 +14409,7 @@ function swift(hljs) {
14727
14409
  };
14728
14410
  const KEYWORD_ATTRIBUTE = {
14729
14411
  scope: "keyword",
14730
- match: concat(/@/, either(...keywordAttributes), lookahead(either(/\(/, /\s+/)))
14412
+ match: concat(/@/, either(...keywordAttributes))
14731
14413
  };
14732
14414
  const USER_DEFINED_ATTRIBUTE = {
14733
14415
  scope: "meta",
@@ -14914,36 +14596,6 @@ function swift(hljs) {
14914
14596
  ],
14915
14597
  end: /}/
14916
14598
  };
14917
- const TYPE_DECLARATION = {
14918
- begin: [
14919
- /(struct|protocol|class|extension|enum|actor)/,
14920
- /\s+/,
14921
- identifier,
14922
- /\s*/
14923
- ],
14924
- beginScope: {
14925
- 1: "keyword",
14926
- 3: "title.class"
14927
- },
14928
- keywords: KEYWORDS2,
14929
- contains: [
14930
- GENERIC_PARAMETERS,
14931
- ...KEYWORD_MODES,
14932
- {
14933
- begin: /:/,
14934
- end: /\{/,
14935
- keywords: KEYWORDS2,
14936
- contains: [
14937
- {
14938
- scope: "title.class.inherited",
14939
- match: typeIdentifier
14940
- },
14941
- ...KEYWORD_MODES
14942
- ],
14943
- relevance: 0
14944
- }
14945
- ]
14946
- };
14947
14599
  for (const variant of STRING.variants) {
14948
14600
  const interpolation = variant.contains.find((mode) => mode.label === "interpol");
14949
14601
  interpolation.keywords = KEYWORDS2;
@@ -14974,7 +14626,19 @@ function swift(hljs) {
14974
14626
  ...COMMENTS,
14975
14627
  FUNCTION_OR_MACRO,
14976
14628
  INIT_SUBSCRIPT,
14977
- TYPE_DECLARATION,
14629
+ {
14630
+ beginKeywords: "struct protocol class extension enum actor",
14631
+ end: "\\{",
14632
+ excludeEnd: true,
14633
+ keywords: KEYWORDS2,
14634
+ contains: [
14635
+ hljs.inherit(hljs.TITLE_MODE, {
14636
+ className: "title.class",
14637
+ begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/
14638
+ }),
14639
+ ...KEYWORD_MODES
14640
+ ]
14641
+ },
14978
14642
  OPERATOR_DECLARATION,
14979
14643
  PRECEDENCEGROUP,
14980
14644
  {
@@ -15483,30 +15147,10 @@ function go(hljs) {
15483
15147
  className: "number",
15484
15148
  variants: [
15485
15149
  {
15486
- match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,
15487
- // hex without a present digit before . (making a digit afterwards required)
15488
- relevance: 0
15489
- },
15490
- {
15491
- match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
15492
- // hex with a present digit before . (making a digit afterwards optional)
15493
- relevance: 0
15494
- },
15495
- {
15496
- match: /-?\b0[oO](_?[0-7])*i?/,
15497
- // leading 0o octal
15498
- relevance: 0
15499
- },
15500
- {
15501
- match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
15502
- // decimal without a present digit before . (making a digit afterwards required)
15503
- relevance: 0
15150
+ begin: hljs.C_NUMBER_RE + "[i]",
15151
+ relevance: 1
15504
15152
  },
15505
- {
15506
- match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
15507
- // decimal with a present digit before . (making a digit afterwards optional)
15508
- relevance: 0
15509
- }
15153
+ hljs.C_NUMBER_MODE
15510
15154
  ]
15511
15155
  },
15512
15156
  {
@@ -16078,7 +15722,7 @@ function c(hljs) {
16078
15722
  className: "meta",
16079
15723
  begin: /#\s*[a-z]+\b/,
16080
15724
  end: /$/,
16081
- keywords: { keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include" },
15725
+ keywords: { keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" },
16082
15726
  contains: [
16083
15727
  {
16084
15728
  begin: /\\\n/,
@@ -16119,8 +15763,6 @@ function c(hljs) {
16119
15763
  "restrict",
16120
15764
  "return",
16121
15765
  "sizeof",
16122
- "typeof",
16123
- "typeof_unqual",
16124
15766
  "struct",
16125
15767
  "switch",
16126
15768
  "typedef",
@@ -16154,26 +15796,14 @@ function c(hljs) {
16154
15796
  "char",
16155
15797
  "void",
16156
15798
  "_Bool",
16157
- "_BitInt",
16158
15799
  "_Complex",
16159
15800
  "_Imaginary",
16160
15801
  "_Decimal32",
16161
15802
  "_Decimal64",
16162
- "_Decimal96",
16163
15803
  "_Decimal128",
16164
- "_Decimal64x",
16165
- "_Decimal128x",
16166
- "_Float16",
16167
- "_Float32",
16168
- "_Float64",
16169
- "_Float128",
16170
- "_Float32x",
16171
- "_Float64x",
16172
- "_Float128x",
16173
15804
  // modifiers
16174
15805
  "const",
16175
15806
  "static",
16176
- "constexpr",
16177
15807
  // aliases
16178
15808
  "complex",
16179
15809
  "bool",
@@ -16356,16 +15986,9 @@ function cpp(hljs) {
16356
15986
  const NUMBERS = {
16357
15987
  className: "number",
16358
15988
  variants: [
16359
- // Floating-point literal.
16360
- {
16361
- begin: "[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"
16362
- },
16363
- // Integer literal.
16364
- {
16365
- begin: "[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"
16366
- // Note: there are user-defined literal suffixes too, but perhaps having the custom suffix not part of the
16367
- // literal highlight actually makes it stand out more.
16368
- }
15989
+ { begin: "\\b(0b[01']+)" },
15990
+ { begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" },
15991
+ { begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" }
16369
15992
  ],
16370
15993
  relevance: 0
16371
15994
  };
@@ -17016,11 +16639,6 @@ function csharp(hljs) {
17016
16639
  ],
17017
16640
  relevance: 0
17018
16641
  };
17019
- const RAW_STRING = {
17020
- className: "string",
17021
- begin: /"""("*)(?!")(.|\n)*?"""\1/,
17022
- relevance: 1
17023
- };
17024
16642
  const VERBATIM_STRING = {
17025
16643
  className: "string",
17026
16644
  begin: '@"',
@@ -17086,7 +16704,6 @@ function csharp(hljs) {
17086
16704
  hljs.inherit(hljs.C_BLOCK_COMMENT_MODE, { illegal: /\n/ })
17087
16705
  ];
17088
16706
  const STRING = { variants: [
17089
- RAW_STRING,
17090
16707
  INTERPOLATED_VERBATIM_STRING,
17091
16708
  INTERPOLATED_STRING,
17092
16709
  VERBATIM_STRING,
@@ -18373,16 +17990,13 @@ function kotlin(hljs) {
18373
17990
  }
18374
17991
  function rust(hljs) {
18375
17992
  const regex = hljs.regex;
18376
- const RAW_IDENTIFIER = /(r#)?/;
18377
- const UNDERSCORE_IDENT_RE2 = regex.concat(RAW_IDENTIFIER, hljs.UNDERSCORE_IDENT_RE);
18378
- const IDENT_RE2 = regex.concat(RAW_IDENTIFIER, hljs.IDENT_RE);
18379
17993
  const FUNCTION_INVOKE = {
18380
17994
  className: "title.function.invoke",
18381
17995
  relevance: 0,
18382
17996
  begin: regex.concat(
18383
17997
  /\b/,
18384
17998
  /(?!let|for|while|if|else|match\b)/,
18385
- IDENT_RE2,
17999
+ hljs.IDENT_RE,
18386
18000
  regex.lookahead(/\s*\(/)
18387
18001
  )
18388
18002
  };
@@ -18432,7 +18046,6 @@ function rust(hljs) {
18432
18046
  "try",
18433
18047
  "type",
18434
18048
  "typeof",
18435
- "union",
18436
18049
  "unsafe",
18437
18050
  "unsized",
18438
18051
  "use",
@@ -18584,7 +18197,7 @@ function rust(hljs) {
18584
18197
  begin: [
18585
18198
  /fn/,
18586
18199
  /\s+/,
18587
- UNDERSCORE_IDENT_RE2
18200
+ hljs.UNDERSCORE_IDENT_RE
18588
18201
  ],
18589
18202
  className: {
18590
18203
  1: "keyword",
@@ -18599,10 +18212,7 @@ function rust(hljs) {
18599
18212
  {
18600
18213
  className: "string",
18601
18214
  begin: /"/,
18602
- end: /"/,
18603
- contains: [
18604
- hljs.BACKSLASH_ESCAPE
18605
- ]
18215
+ end: /"/
18606
18216
  }
18607
18217
  ]
18608
18218
  },
@@ -18611,7 +18221,7 @@ function rust(hljs) {
18611
18221
  /let/,
18612
18222
  /\s+/,
18613
18223
  /(?:mut\s+)?/,
18614
- UNDERSCORE_IDENT_RE2
18224
+ hljs.UNDERSCORE_IDENT_RE
18615
18225
  ],
18616
18226
  className: {
18617
18227
  1: "keyword",
@@ -18624,7 +18234,7 @@ function rust(hljs) {
18624
18234
  begin: [
18625
18235
  /for/,
18626
18236
  /\s+/,
18627
- UNDERSCORE_IDENT_RE2,
18237
+ hljs.UNDERSCORE_IDENT_RE,
18628
18238
  /\s+/,
18629
18239
  /in/
18630
18240
  ],
@@ -18638,7 +18248,7 @@ function rust(hljs) {
18638
18248
  begin: [
18639
18249
  /type/,
18640
18250
  /\s+/,
18641
- UNDERSCORE_IDENT_RE2
18251
+ hljs.UNDERSCORE_IDENT_RE
18642
18252
  ],
18643
18253
  className: {
18644
18254
  1: "keyword",
@@ -18649,7 +18259,7 @@ function rust(hljs) {
18649
18259
  begin: [
18650
18260
  /(?:trait|enum|struct|union|impl|for)/,
18651
18261
  /\s+/,
18652
- UNDERSCORE_IDENT_RE2
18262
+ hljs.UNDERSCORE_IDENT_RE
18653
18263
  ],
18654
18264
  className: {
18655
18265
  1: "keyword",
@@ -21718,7 +21328,7 @@ var sigmasAndXis = {
21718
21328
  sqrtRuleThickness: [0.04, 0.04, 0.04],
21719
21329
  // This value determines how large a pt is, for metrics which are defined
21720
21330
  // in terms of pts.
21721
- // This value is also used in katex.scss; if you change it make sure the
21331
+ // This value is also used in katex.less; if you change it make sure the
21722
21332
  // values match.
21723
21333
  ptPerEm: [10, 10, 10],
21724
21334
  // The space between adjacent `|` columns in an array definition. From
@@ -25453,7 +25063,8 @@ function parseCD(parser) {
25453
25063
  mode: "math",
25454
25064
  body: []
25455
25065
  };
25456
- if ("=|.".indexOf(arrowChar) > -1) ;
25066
+ if ("=|.".indexOf(arrowChar) > -1)
25067
+ ;
25457
25068
  else if ("<>AV".indexOf(arrowChar) > -1) {
25458
25069
  for (var labelNum = 0; labelNum < 2; labelNum++) {
25459
25070
  var inLabel = true;
@@ -29491,7 +29102,8 @@ var mathmlBuilder2 = (group, options) => {
29491
29102
  var isAllString = true;
29492
29103
  for (var i = 0; i < expression.length; i++) {
29493
29104
  var node = expression[i];
29494
- if (node instanceof mathMLTree.SpaceNode) ;
29105
+ if (node instanceof mathMLTree.SpaceNode)
29106
+ ;
29495
29107
  else if (node instanceof mathMLTree.MathNode) {
29496
29108
  switch (node.type) {
29497
29109
  case "mi":
@@ -30435,10 +30047,9 @@ var optionsWithFont = (group, options) => {
30435
30047
  return options.withTextFontFamily(textFontFamilies[font]);
30436
30048
  } else if (textFontWeights[font]) {
30437
30049
  return options.withTextFontWeight(textFontWeights[font]);
30438
- } else if (font === "\\emph") {
30439
- return options.fontShape === "textit" ? options.withTextFontShape("textup") : options.withTextFontShape("textit");
30050
+ } else {
30051
+ return options.withTextFontShape(textFontShapes[font]);
30440
30052
  }
30441
- return options.withTextFontShape(textFontShapes[font]);
30442
30053
  };
30443
30054
  defineFunction({
30444
30055
  type: "text",
@@ -30454,8 +30065,7 @@ defineFunction({
30454
30065
  "\\textmd",
30455
30066
  // Font Shapes
30456
30067
  "\\textit",
30457
- "\\textup",
30458
- "\\emph"
30068
+ "\\textup"
30459
30069
  ],
30460
30070
  props: {
30461
30071
  numArgs: 1,
@@ -33194,7 +32804,7 @@ var katex = {
33194
32804
  /**
33195
32805
  * Current KaTeX version
33196
32806
  */
33197
- version: "0.16.11",
32807
+ version: "0.16.10",
33198
32808
  /**
33199
32809
  * Renders the given LaTeX into an HTML+MathML combination, and adds
33200
32810
  * it as a child to the specified DOM node.
@@ -39523,9 +39133,18 @@ const TableToolbar = defineComponent(
39523
39133
  editor.value.range.anchor.element = editor.value.range.focus.element;
39524
39134
  editor.value.range.anchor.offset = editor.value.range.focus.offset;
39525
39135
  }
39526
- const row = getMatchElementByRange(editor.value, dataRangeCaches.value, { parsedom: "tr" });
39527
- if (row) {
39136
+ const cell = getMatchElementByRange(editor.value, dataRangeCaches.value, { parsedom: "td" });
39137
+ if (cell) {
39138
+ const { rowspan } = getCellSpanNumber(cell);
39139
+ let row = cell.parent;
39528
39140
  const tbody = row.parent;
39141
+ if (type == "down") {
39142
+ let i = 1;
39143
+ while (i < rowspan) {
39144
+ row = editor.value.getNextElement(row);
39145
+ i++;
39146
+ }
39147
+ }
39529
39148
  const { columnNumber } = getTableSize(tbody.children);
39530
39149
  const children = [];
39531
39150
  for (let i = 0; i < columnNumber; i++) {
@@ -44618,7 +44237,7 @@ const Editify = withInstall(editify);
44618
44237
  const install = (app) => {
44619
44238
  app.component(Editify.name, Editify);
44620
44239
  };
44621
- const version = "0.2.26";
44240
+ const version = "0.2.28";
44622
44241
  console.log(`%c vue-editify %c v${version} `, "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;", "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;");
44623
44242
  export {
44624
44243
  AlexElement,