@mojir/lits 2.6.1 → 2.6.2
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.
- package/dist/cli/cli.js +1 -20
- package/package.json +2 -1
package/dist/cli/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ var readline = require('node:readline');
|
|
|
7
7
|
var os = require('node:os');
|
|
8
8
|
var process$1 = require('node:process');
|
|
9
9
|
|
|
10
|
-
var version = "2.6.
|
|
10
|
+
var version = "2.6.2";
|
|
11
11
|
|
|
12
12
|
function getCodeMarker(sourceCodeInfo) {
|
|
13
13
|
if (!sourceCodeInfo.position || !sourceCodeInfo.code)
|
|
@@ -34908,24 +34908,6 @@ function getLitsExpressionRules(cli) {
|
|
|
34908
34908
|
function getLitsFormatter(fmt) {
|
|
34909
34909
|
return createFormatter(getLitsExpressionRules(fmt));
|
|
34910
34910
|
}
|
|
34911
|
-
function getInlineLitsExpressionRule(fmt) {
|
|
34912
|
-
return (text, index) => {
|
|
34913
|
-
if (text.slice(index, index + 2) === '``') {
|
|
34914
|
-
let count = 2;
|
|
34915
|
-
let body = '';
|
|
34916
|
-
while (index + count < text.length && text.slice(index + count, index + count + 2) !== '``') {
|
|
34917
|
-
body += text[index + count];
|
|
34918
|
-
count += 1;
|
|
34919
|
-
}
|
|
34920
|
-
if (text.slice(index + count, index + count + 2) !== '``')
|
|
34921
|
-
throw new Error(`No end \` found for rule inlineLitsCodeRule: ${text}`);
|
|
34922
|
-
count += 2;
|
|
34923
|
-
const formattedText = getLitsFormatter(fmt)(body);
|
|
34924
|
-
return { count, formattedText };
|
|
34925
|
-
}
|
|
34926
|
-
return { count: 0, formattedText: '' };
|
|
34927
|
-
};
|
|
34928
|
-
}
|
|
34929
34911
|
const italicRule = createRule({
|
|
34930
34912
|
name: 'italic',
|
|
34931
34913
|
startPattern: /^\*\*\*/,
|
|
@@ -34942,7 +34924,6 @@ const boldRule = createRule({
|
|
|
34942
34924
|
});
|
|
34943
34925
|
function getMdRules(fmt) {
|
|
34944
34926
|
return [
|
|
34945
|
-
getInlineLitsExpressionRule(fmt),
|
|
34946
34927
|
getInlineCodeRule(fmt),
|
|
34947
34928
|
italicRule,
|
|
34948
34929
|
boldRule,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojir/lits",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "Lits is a pure functional programming language implemented in TypeScript",
|
|
5
5
|
"author": "Albert Mojir",
|
|
6
6
|
"license": "MIT",
|
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
139
|
"@antfu/eslint-config": "2.21.1",
|
|
140
|
+
"@mermaid-js/mermaid-cli": "^11.12.0",
|
|
140
141
|
"@rollup/plugin-json": "6.1.0",
|
|
141
142
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
142
143
|
"@rollup/plugin-terser": "^0.4.4",
|