Initial commit: New MoreminiMore website with fresh design

This commit is contained in:
MoreminiMore
2026-04-22 01:59:05 +07:00
commit 76409638cc
14010 changed files with 2052041 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
import { t as JavaScriptScanner } from "./scanner-BFcBmQR1.mjs";
import { toRegExp } from "oniguruma-to-es";
//#region src/engine-compile.ts
/**
* The default regex constructor for the JavaScript RegExp engine.
*/
function defaultJavaScriptRegexConstructor(pattern, options) {
return toRegExp(pattern, {
global: true,
hasIndices: true,
lazyCompileLength: 3e3,
rules: {
allowOrphanBackrefs: true,
asciiWordBoundaries: true,
captureGroup: true,
recursionLimit: 5,
singleline: true
},
...options
});
}
/**
* Use the modern JavaScript RegExp engine to implement the OnigScanner.
*
* As Oniguruma supports some features that can't be emulated using native JavaScript regexes, some
* patterns are not supported. Errors will be thrown when parsing TextMate grammars with
* unsupported patterns, and when the grammar includes patterns that use invalid Oniguruma syntax.
* Set `forgiving` to `true` to ignore these errors and skip any unsupported or invalid patterns.
*/
function createJavaScriptRegexEngine(options = {}) {
const _options = Object.assign({
target: "auto",
cache: /* @__PURE__ */ new Map()
}, options);
_options.regexConstructor ||= (pattern) => defaultJavaScriptRegexConstructor(pattern, { target: _options.target });
return {
createScanner(patterns) {
return new JavaScriptScanner(patterns, _options);
},
createString(s) {
return { content: s };
}
};
}
//#endregion
export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor };