mystmd 1.3.22__py3-none-any.whl → 1.3.23__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mystmd
3
- Version: 1.3.22
3
+ Version: 1.3.23
4
4
  Summary: Command line tools for MyST Markdown
5
5
  Project-URL: Homepage, https://github.com/jupyter-book/mystmd
6
6
  Project-URL: Bug Tracker, https://github.com/jupyter-book/mystmd/issues
@@ -0,0 +1,9 @@
1
+ mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
3
+ mystmd_py/myst.cjs,sha256=00dVzv1WaK2tqvUGNeE0kbFiseD2ZnQOJM_abBdWRhI,13189143
4
+ mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
5
+ mystmd-1.3.23.dist-info/METADATA,sha256=483pxz-GI-p5hnhfYt-YvtQkrdugNf9e7EZZyPrPqOw,3020
6
+ mystmd-1.3.23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ mystmd-1.3.23.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
8
+ mystmd-1.3.23.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
9
+ mystmd-1.3.23.dist-info/RECORD,,
mystmd_py/myst.cjs CHANGED
@@ -193891,7 +193891,7 @@ var {
193891
193891
  } = import_index.default;
193892
193892
 
193893
193893
  // src/version.ts
193894
- var version = "1.3.22";
193894
+ var version = "1.3.23";
193895
193895
  var version_default = version;
193896
193896
 
193897
193897
  // ../myst-cli/dist/build/build.js
@@ -239081,7 +239081,7 @@ function initializeTargetCounts(numbering, previousCounts, offset) {
239081
239081
  const targetCounts = { heading: heading6 };
239082
239082
  Object.entries(previousCounts !== null && previousCounts !== void 0 ? previousCounts : {}).filter(([key2]) => key2 !== "heading").filter(([key2]) => {
239083
239083
  var _a6, _b;
239084
- return !numbering[key2] || ((_a6 = numbering[key2]) === null || _a6 === void 0 ? void 0 : _a6.continue) || ((_b = numbering.all) === null || _b === void 0 ? void 0 : _b.continue);
239084
+ return ((_a6 = numbering[key2]) === null || _a6 === void 0 ? void 0 : _a6.continue) || ((_b = numbering.all) === null || _b === void 0 ? void 0 : _b.continue);
239085
239085
  }).forEach(([key2, val]) => {
239086
239086
  targetCounts[key2] = { ...val };
239087
239087
  });
@@ -287957,7 +287957,7 @@ var MARKDOWN_IT_CONFIG = {
287957
287957
  }
287958
287958
  }
287959
287959
  };
287960
- var EXCLUDE_TLDS = ["py", "md", "dot", "next", "so", "es"];
287960
+ var EXCLUDE_TLDS = ["py", "md", "dot", "next", "so", "es", "java", "zip"];
287961
287961
 
287962
287962
  // ../myst-parser/dist/tokensToMyst.js
287963
287963
  var import_he = __toESM(require_he(), 1);
@@ -289012,6 +289012,34 @@ function mystParse(content3, opts) {
289012
289012
  return tree;
289013
289013
  }
289014
289014
 
289015
+ // ../myst-ext-button/dist/index.js
289016
+ var REF_PATTERN6 = /^(.+?)<([^<>]+)>$/;
289017
+ var buttonRole = {
289018
+ name: "button",
289019
+ doc: "Button element with an action to navigate to internal or external links.",
289020
+ body: {
289021
+ type: String,
289022
+ doc: "The body of the button.",
289023
+ required: true
289024
+ },
289025
+ run(data) {
289026
+ const body3 = data.body;
289027
+ const match3 = REF_PATTERN6.exec(body3);
289028
+ const [, modified, rawLabel] = match3 !== null && match3 !== void 0 ? match3 : [];
289029
+ const url = rawLabel !== null && rawLabel !== void 0 ? rawLabel : body3;
289030
+ const node3 = {
289031
+ type: "link",
289032
+ url,
289033
+ children: [],
289034
+ class: "button"
289035
+ // TODO: allow users to extend this
289036
+ };
289037
+ if (modified)
289038
+ node3.children = [{ type: "text", value: modified.trim() }];
289039
+ return [node3];
289040
+ }
289041
+ };
289042
+
289015
289043
  // ../myst-ext-card/dist/index.js
289016
289044
  var HEADER_REGEX = /((?<before>[\s\S]*?)\s+){0,1}\^\^\^(\s+(?<after>[\s\S]*)){0,1}/;
289017
289045
  var cardDirective = {
@@ -289502,7 +289530,7 @@ function parseMyst(session, content3, file, opts) {
289502
289530
  extensions: {
289503
289531
  frontmatter: !(opts === null || opts === void 0 ? void 0 : opts.ignoreFrontmatter)
289504
289532
  },
289505
- roles: [...(_d2 = (_c = session.plugins) === null || _c === void 0 ? void 0 : _c.roles) !== null && _d2 !== void 0 ? _d2 : []],
289533
+ roles: [buttonRole, ...(_d2 = (_c = session.plugins) === null || _c === void 0 ? void 0 : _c.roles) !== null && _d2 !== void 0 ? _d2 : []],
289506
289534
  vfile: vfile2
289507
289535
  });
289508
289536
  logMessagesFromVFile(session, vfile2);
@@ -289519,7 +289547,7 @@ var import_node_path16 = __toESM(require("path"), 1);
289519
289547
  var import_nbtx = __toESM(require_cjs2(), 1);
289520
289548
 
289521
289549
  // ../myst-cli/dist/version.js
289522
- var version2 = "1.3.22";
289550
+ var version2 = "1.3.23";
289523
289551
  var version_default2 = version2;
289524
289552
 
289525
289553
  // ../myst-cli/dist/utils/headers.js
@@ -290707,7 +290735,7 @@ function findExpression(expressions, value) {
290707
290735
  function processLatex(value) {
290708
290736
  return value.trim().replace(/^\$(\\displaystyle)?/, "").replace(/\$$/, "").trim();
290709
290737
  }
290710
- function processPlainText(content3) {
290738
+ function stripTextQuotes(content3) {
290711
290739
  return content3.replace(/^(["'])(.*)\1$/, "$2");
290712
290740
  }
290713
290741
  function renderExpression(node3, file) {
@@ -290717,6 +290745,7 @@ function renderExpression(node3, file) {
290717
290745
  let content3;
290718
290746
  if (result.status === "ok") {
290719
290747
  Object.entries(result.data).forEach(([mimeType, value]) => {
290748
+ var _a6, _b;
290720
290749
  if (content3) {
290721
290750
  return;
290722
290751
  } else if (mimeType.startsWith("image/")) {
@@ -290731,7 +290760,13 @@ function renderExpression(node3, file) {
290731
290760
  } else if (mimeType === "text/html") {
290732
290761
  content3 = [{ type: "html", value }];
290733
290762
  } else if (mimeType === "text/plain") {
290734
- content3 = [{ type: "text", value: processPlainText(value) }];
290763
+ const stripQuotes = (_b = (_a6 = result.metadata) === null || _a6 === void 0 ? void 0 : _a6["strip-quotes"]) !== null && _b !== void 0 ? _b : true;
290764
+ content3 = [
290765
+ {
290766
+ type: "text",
290767
+ value: stripQuotes ? stripTextQuotes(value) : value
290768
+ }
290769
+ ];
290735
290770
  }
290736
290771
  });
290737
290772
  if (content3)
@@ -1,9 +0,0 @@
1
- mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
3
- mystmd_py/myst.cjs,sha256=eeCYLVRBruaBsEwD6awaeOYBt_DojL9MfTlp0G3DMRY,13188096
4
- mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
5
- mystmd-1.3.22.dist-info/METADATA,sha256=8U3d2XbHK8wTCDT-dt8_sFBx2oe0fgUTA74HFg6xNOc,3020
6
- mystmd-1.3.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- mystmd-1.3.22.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
8
- mystmd-1.3.22.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
9
- mystmd-1.3.22.dist-info/RECORD,,