openmates 0.9.3 → 0.10.0-alpha.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.
|
@@ -5424,6 +5424,8 @@ function renderWebReadFullscreen(c) {
|
|
|
5424
5424
|
}
|
|
5425
5425
|
function renderMathCalculatePreview(c, ln) {
|
|
5426
5426
|
const results = c.results;
|
|
5427
|
+
const title = str(c.title);
|
|
5428
|
+
if (title) ln(trunc(title, 80));
|
|
5427
5429
|
if (Array.isArray(results) && results.length > 0) {
|
|
5428
5430
|
const first = results[0];
|
|
5429
5431
|
const expr = str(first.expression) ?? str(first.input) ?? "";
|
|
@@ -5434,13 +5436,19 @@ function renderMathCalculatePreview(c, ln) {
|
|
|
5434
5436
|
}
|
|
5435
5437
|
function renderMathCalculateFullscreen(c) {
|
|
5436
5438
|
const results = c.results;
|
|
5439
|
+
const title = str(c.title);
|
|
5440
|
+
if (title) process.stdout.write(` \x1B[2mTitle:\x1B[0m ${title}
|
|
5441
|
+
`);
|
|
5437
5442
|
if (!Array.isArray(results) || results.length === 0) {
|
|
5438
5443
|
console.log("No calculation results.");
|
|
5439
5444
|
return;
|
|
5440
5445
|
}
|
|
5441
5446
|
for (const r of results) {
|
|
5447
|
+
const resultTitle = str(r.title);
|
|
5442
5448
|
const expr = str(r.expression) ?? str(r.input) ?? "";
|
|
5443
5449
|
const result = str(r.result) ?? str(r.output) ?? "";
|
|
5450
|
+
if (resultTitle && resultTitle !== title) process.stdout.write(` \x1B[2mTitle:\x1B[0m ${resultTitle}
|
|
5451
|
+
`);
|
|
5444
5452
|
if (expr) process.stdout.write(` \x1B[2mExpression:\x1B[0m ${expr}
|
|
5445
5453
|
`);
|
|
5446
5454
|
if (result) process.stdout.write(` \x1B[1mResult:\x1B[0m ${result}
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED