mystmd 1.3.7__py3-none-any.whl → 1.3.8__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.
- {mystmd-1.3.7.dist-info → mystmd-1.3.8.dist-info}/METADATA +1 -1
- mystmd-1.3.8.dist-info/RECORD +9 -0
- mystmd_py/myst.cjs +37 -28
- mystmd-1.3.7.dist-info/RECORD +0 -9
- {mystmd-1.3.7.dist-info → mystmd-1.3.8.dist-info}/WHEEL +0 -0
- {mystmd-1.3.7.dist-info → mystmd-1.3.8.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.7.dist-info → mystmd-1.3.8.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
mystmd_py/main.py,sha256=o4Kz4iw3TEAw63qPsTuX0lrrq-tFEbrUbrxC4dTlXB8,4855
|
3
|
+
mystmd_py/myst.cjs,sha256=CMFNN3Q13AfakBIB9G_kZw0Hk_o_d-j1sMP39yJnvBo,13104265
|
4
|
+
mystmd_py/nodeenv.py,sha256=3dJ9ZmO5u4smh5EkmOPDYOuHR8-5or181ifPHY-TBaA,2089
|
5
|
+
mystmd-1.3.8.dist-info/METADATA,sha256=f7jBsGyPHN4E4eJsY3jWiHIRSWGPQVSQQ_20ecboL_E,3019
|
6
|
+
mystmd-1.3.8.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
7
|
+
mystmd-1.3.8.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
+
mystmd-1.3.8.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
+
mystmd-1.3.8.dist-info/RECORD,,
|
mystmd_py/myst.cjs
CHANGED
@@ -193562,7 +193562,7 @@ var {
|
|
193562
193562
|
} = import_index.default;
|
193563
193563
|
|
193564
193564
|
// src/version.ts
|
193565
|
-
var version = "1.3.
|
193565
|
+
var version = "1.3.8";
|
193566
193566
|
var version_default = version;
|
193567
193567
|
|
193568
193568
|
// ../myst-cli/dist/build/build.js
|
@@ -280389,7 +280389,7 @@ function runDirectives(state) {
|
|
280389
280389
|
directiveOpen.map = map14;
|
280390
280390
|
directiveOpen.meta = {
|
280391
280391
|
arg: arg2,
|
280392
|
-
options:
|
280392
|
+
options: getDirectiveOptions(options),
|
280393
280393
|
// Tightness is computed for all directives (are they separated by a newline before/after)
|
280394
280394
|
tight: computeBlockTightness(state.src, token.map)
|
280395
280395
|
};
|
@@ -280471,7 +280471,7 @@ function parseDirectiveContent(content3, info, state) {
|
|
280471
280471
|
const match3 = COLON_OPTION_REGEX.exec(line2);
|
280472
280472
|
const { option: option3, value } = (_a6 = match3 === null || match3 === void 0 ? void 0 : match3.groups) !== null && _a6 !== void 0 ? _a6 : {};
|
280473
280473
|
if (option3)
|
280474
|
-
options.push([option3, value ||
|
280474
|
+
options.push([option3, value || true]);
|
280475
280475
|
bodyOffset++;
|
280476
280476
|
}
|
280477
280477
|
}
|
@@ -280482,31 +280482,28 @@ function parseDirectiveContent(content3, info, state) {
|
|
280482
280482
|
function directiveArgToTokens(arg2, lineNumber, state) {
|
280483
280483
|
return nestedPartToTokens("directive_arg", arg2, lineNumber, state, "run_directives", true);
|
280484
280484
|
}
|
280485
|
-
function
|
280485
|
+
function getDirectiveOptions(options) {
|
280486
280486
|
if (!options)
|
280487
280487
|
return void 0;
|
280488
280488
|
const simplified = {};
|
280489
280489
|
options.forEach(([key2, val]) => {
|
280490
280490
|
if (simplified[key2] !== void 0) {
|
280491
280491
|
return;
|
280492
|
-
} else if (!isNaN(Number(val))) {
|
280493
|
-
simplified[key2] = Number(val);
|
280494
|
-
} else if (typeof val === "string" && val.toLowerCase() === "true") {
|
280495
|
-
simplified[key2] = true;
|
280496
|
-
} else if (typeof val === "string" && val.toLowerCase() === "false") {
|
280497
|
-
simplified[key2] = false;
|
280498
|
-
} else {
|
280499
|
-
simplified[key2] = val;
|
280500
280492
|
}
|
280493
|
+
simplified[key2] = val;
|
280501
280494
|
});
|
280502
280495
|
return simplified;
|
280503
280496
|
}
|
280504
280497
|
function directiveOptionsToTokens(options, lineNumber, state) {
|
280505
280498
|
const tokens = options.map(([key2, value], index4) => {
|
280506
|
-
const optTokens = nestedPartToTokens("directive_option",
|
280499
|
+
const optTokens = typeof value === "string" ? nestedPartToTokens("directive_option", value, lineNumber + index4, state, "run_directives", true) : [
|
280500
|
+
new state.Token("directive_option_open", "", 1),
|
280501
|
+
new state.Token("directive_option_close", "", -1)
|
280502
|
+
];
|
280507
280503
|
if (optTokens.length) {
|
280508
280504
|
optTokens[0].info = key2;
|
280509
|
-
optTokens[0].content = value;
|
280505
|
+
optTokens[0].content = typeof value === "string" ? value : "";
|
280506
|
+
optTokens[0].meta = { value };
|
280510
280507
|
}
|
280511
280508
|
return optTokens;
|
280512
280509
|
});
|
@@ -287928,7 +287925,7 @@ var defaultMdast = {
|
|
287928
287925
|
getAttrs(t2) {
|
287929
287926
|
return {
|
287930
287927
|
name: t2.info,
|
287931
|
-
value: t2.
|
287928
|
+
value: t2.meta.value
|
287932
287929
|
};
|
287933
287930
|
}
|
287934
287931
|
},
|
@@ -288129,6 +288126,8 @@ function contentFromNode(node3, spec, vfile2, description, ruleId) {
|
|
288129
288126
|
return void 0;
|
288130
288127
|
}
|
288131
288128
|
if (spec.type === ParseTypesEnum.string || spec.type === String) {
|
288129
|
+
if (value === true)
|
288130
|
+
return "";
|
288132
288131
|
if (typeof value !== "string" && !(value && typeof value === "number" && !isNaN(value))) {
|
288133
288132
|
fileWarn(vfile2, `value is not a string for ${description}`, { node: node3, ruleId });
|
288134
288133
|
}
|
@@ -288136,7 +288135,7 @@ function contentFromNode(node3, spec, vfile2, description, ruleId) {
|
|
288136
288135
|
}
|
288137
288136
|
if (spec.type === ParseTypesEnum.number || spec.type === Number) {
|
288138
288137
|
const valueAsNumber = Number(value);
|
288139
|
-
if (isNaN(valueAsNumber)) {
|
288138
|
+
if (value === true || isNaN(valueAsNumber)) {
|
288140
288139
|
const fileFn = spec.required ? fileError : fileWarn;
|
288141
288140
|
fileFn(vfile2, `number not provided for ${description}`, { node: node3, ruleId });
|
288142
288141
|
return void 0;
|
@@ -288471,17 +288470,22 @@ var cardDirective = {
|
|
288471
288470
|
name: "card",
|
288472
288471
|
alias: ["grid-item-card"],
|
288473
288472
|
arg: {
|
288474
|
-
type: "myst"
|
288473
|
+
type: "myst",
|
288474
|
+
doc: "The title of the card, usually shown as bolded text at the top of the card."
|
288475
288475
|
},
|
288476
288476
|
options: {
|
288477
|
-
|
288478
|
-
type: String
|
288477
|
+
url: {
|
288478
|
+
type: String,
|
288479
|
+
alias: ["link"],
|
288480
|
+
doc: "Turns the card into a link, can be internal or external."
|
288479
288481
|
},
|
288480
288482
|
header: {
|
288481
|
-
type: "myst"
|
288483
|
+
type: "myst",
|
288484
|
+
doc: "Adds a header to the card."
|
288482
288485
|
},
|
288483
288486
|
footer: {
|
288484
|
-
type: "myst"
|
288487
|
+
type: "myst",
|
288488
|
+
doc: "Adds a footer to the card."
|
288485
288489
|
}
|
288486
288490
|
// // https://sphinx-design.readthedocs.io/en/furo-theme/cards.html#card-options
|
288487
288491
|
// width
|
@@ -288512,10 +288516,11 @@ var cardDirective = {
|
|
288512
288516
|
},
|
288513
288517
|
body: {
|
288514
288518
|
type: "myst",
|
288515
|
-
required: true
|
288519
|
+
required: true,
|
288520
|
+
doc: "Main body content of the card."
|
288516
288521
|
},
|
288517
288522
|
run(data) {
|
288518
|
-
const {
|
288523
|
+
const { url, header, footer: footer2 } = data.options || {};
|
288519
288524
|
let headerChildren;
|
288520
288525
|
let bodyChildren;
|
288521
288526
|
let footerChildren;
|
@@ -288552,7 +288557,7 @@ var cardDirective = {
|
|
288552
288557
|
return [
|
288553
288558
|
{
|
288554
288559
|
type: "card",
|
288555
|
-
url
|
288560
|
+
url,
|
288556
288561
|
children
|
288557
288562
|
}
|
288558
288563
|
];
|
@@ -289038,7 +289043,7 @@ var import_node_path15 = __toESM(require("path"), 1);
|
|
289038
289043
|
var import_nbtx = __toESM(require_cjs2(), 1);
|
289039
289044
|
|
289040
289045
|
// ../myst-cli/dist/version.js
|
289041
|
-
var version2 = "1.3.
|
289046
|
+
var version2 = "1.3.8";
|
289042
289047
|
var version_default2 = version2;
|
289043
289048
|
|
289044
289049
|
// ../myst-cli/dist/utils/headers.js
|
@@ -302319,13 +302324,13 @@ function applyComputedOutputsToNodes(nodes, computedResult) {
|
|
302319
302324
|
async function kernelExecutionTransform(tree, vfile2, opts) {
|
302320
302325
|
var _a6;
|
302321
302326
|
const log = (_a6 = opts.log) !== null && _a6 !== void 0 ? _a6 : console;
|
302322
|
-
if (opts.frontmatter.kernelspec === void 0) {
|
302323
|
-
return fileError(vfile2, `Notebook does not declare the necessary 'kernelspec' frontmatter key required for execution`);
|
302324
|
-
}
|
302325
302327
|
const executableNodes = selectAll(`block[kind=${NotebookCell.code}],inlineExpression`, tree);
|
302326
302328
|
if (executableNodes.length === 0) {
|
302327
302329
|
return;
|
302328
302330
|
}
|
302331
|
+
if (opts.frontmatter.kernelspec === void 0) {
|
302332
|
+
return fileError(vfile2, `Notebook does not declare the necessary 'kernelspec' frontmatter key required for execution`);
|
302333
|
+
}
|
302329
302334
|
const cacheKey = buildCacheKey(opts.frontmatter.kernelspec, executableNodes);
|
302330
302335
|
let cachedResults = opts.cache.get(cacheKey);
|
302331
302336
|
if (opts.ignoreCache || cachedResults === void 0) {
|
@@ -304400,6 +304405,10 @@ var ENVIRONMENTS2 = [
|
|
304400
304405
|
];
|
304401
304406
|
var RE_OPEN2 = new RegExp(`^\\\\begin{(${ENVIRONMENTS2.join("|")})([*]?)}`);
|
304402
304407
|
function isAmsmathEnvironment(value) {
|
304408
|
+
const matches4 = value.trim().matchAll(new RegExp(`\\\\begin{(${ENVIRONMENTS2.join("|")})}`, "g"));
|
304409
|
+
if ([...matches4].length > 1) {
|
304410
|
+
return false;
|
304411
|
+
}
|
304403
304412
|
const matchOpen = value.trim().match(RE_OPEN2);
|
304404
304413
|
if (!matchOpen)
|
304405
304414
|
return false;
|
mystmd-1.3.7.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
mystmd_py/main.py,sha256=o4Kz4iw3TEAw63qPsTuX0lrrq-tFEbrUbrxC4dTlXB8,4855
|
3
|
-
mystmd_py/myst.cjs,sha256=PR3oMpQN43Mt_vteFIcrIi6qLOPO-GNJQPkiJrkpjh0,13103855
|
4
|
-
mystmd_py/nodeenv.py,sha256=3dJ9ZmO5u4smh5EkmOPDYOuHR8-5or181ifPHY-TBaA,2089
|
5
|
-
mystmd-1.3.7.dist-info/METADATA,sha256=kbNmwO5L2cwCsJzrQVkMaGTogQu-306oDUkfJP0M_Cg,3019
|
6
|
-
mystmd-1.3.7.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
7
|
-
mystmd-1.3.7.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
-
mystmd-1.3.7.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
-
mystmd-1.3.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|