summaryrefslogtreecommitdiffstats
path: root/rust/wolfree_sed_in_place/src/include_str.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--rust/wolfree_sed_in_place/src/include_str.js (renamed from rust/wolfree_sed_in_place/src/include_str.tsx)24
1 files changed, 9 insertions, 15 deletions
diff --git a/rust/wolfree_sed_in_place/src/include_str.tsx b/rust/wolfree_sed_in_place/src/include_str.js
index 3c8ff4e..9ef3a31 100644
--- a/rust/wolfree_sed_in_place/src/include_str.tsx
+++ b/rust/wolfree_sed_in_place/src/include_str.js
@@ -1,14 +1,10 @@
-/**
- * @license
- * SPDX-License-Identifier: AGPL-3.0-or-later
- * This file is part of Wolfree.
- * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- */
+/* SPDX-License-Identifier: AGPL-3.0-or-later */
// @ts-check
const wolfreeLexicalScopeName = (() => {
- const possibleLetters = Array();
+ /** @type {string[]} */
+ const possibleLetters = [];
for (let i = 32; i < 127; i++) {
possibleLetters.push(String.fromCharCode(i));
@@ -18,7 +14,7 @@ const wolfreeLexicalScopeName = (() => {
possibleLetters.map((y) => x + y)
);
- const isValid = (name = String()) => {
+ const isValid = (name = "") => {
try {
return (
typeof eval(name).value === "string" &&
@@ -32,7 +28,7 @@ const wolfreeLexicalScopeName = (() => {
const wolfreeLexicalScopeName = possibleNames.find(isValid);
if (typeof wolfreeLexicalScopeName !== "string") {
- console.error({ wolfreeLexicalScopeName });
+ console.warn({ wolfreeLexicalScopeName });
return "";
}
@@ -40,7 +36,7 @@ const wolfreeLexicalScopeName = (() => {
})();
(() => {
- const get = (params = String()) => {
+ const get = (params = "") => {
return new URLSearchParams(location.search).get(params);
};
@@ -51,8 +47,6 @@ const wolfreeLexicalScopeName = (() => {
/**
* Regex in regex - Rust
* https://docs.rs/regex/latest/regex/struct.Regex.html#replacement-string-syntax
- * All instances of $ref in the replacement string are replaced with the substring corresponding to the capture group identified by ref.
- * ref may be an integer corresponding to the index of the capture group (counted by order of opening parenthesis where 0 is the entire match) or it can be a name (consisting of letters, digits or underscores) corresponding to a named capture group.
*/
// @ts-ignore
$0;
@@ -61,11 +55,11 @@ $0;
(
await import(
// @ts-ignore
- "../../../ajax/libs/wolfree/23.7.8/js/Entrypoint.js"
+ "/ajax/libs/wolfree/2023.8.31/js/entrypoint.js"
)
).default({
input: eval(wolfreeLexicalScopeName).value,
- i2d: eval(wolfreeLexicalScopeName).i2d,
- extraPodstates: [],
+ ...(eval(wolfreeLexicalScopeName).i2d ? { i2d: true } : {}),
+ podstate: ["Step-by-step solution", "Step-by-step", "Show all steps"],
});
})();