Skip to content

Commit e4e22ab

Browse files
committed
Fix
1 parent ded8400 commit e4e22ab

8 files changed

Lines changed: 12 additions & 12 deletions

File tree

npm/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "noshift.js",
3-
"version": "0.15.0",
3+
"version": "0.15.1",
44
"description": "Joke language.",
55
"bin": {
66
"nsc": "./dist/cli.cjs"

npm/src/__tests__/convert.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ describe("convert: Comments", () => {
215215
});
216216

217217
it("no NoShift conversion inside comments", () => {
218-
expect(convert("// ^1 ^2 ^3x")).toBe("// ^1 ^2 ^3x");
218+
expect(convert("// ^1 ^2 ^6x")).toBe("// ^1 ^2 ^6x");
219219
});
220220

221221
it("no conversion inside block comments", () => {
222-
expect(convert("/^: ^1 ^2 ^3x ^:/")).toBe("/* ^1 ^2 ^3x */");
222+
expect(convert("/^: ^1 ^2 ^6x ^:/")).toBe("/* ^1 ^2 ^6x */");
223223
});
224224
});
225225

npm/src/convert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ export interface DiagnosticError {
739739
* - 閉じられていない文字列リテラル (^2, ^7, ^@)
740740
* - 閉じられていないブロックコメント (/^:)
741741
* - 閉じられていないテンプレート式 (^4^[)
742-
* - ファイル末尾の ^3 (大文字化対象の文字がない)
742+
* - ファイル末尾の ^6 (大文字化対象の文字がない)
743743
* - 不明な ^ シーケンス
744744
*/
745745
export function diagnose(nsjsCode: string): DiagnosticError[] {

npm/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @example
77
* import { compile } from "noshift.js";
88
*
9-
* const result = compile('console.log^8^2^3hello^2^9;');
9+
* const result = compile('console.log^8^2^6hello^2^9;');
1010
* console.log(result.outputText);
1111
* // => console.log("Hello");
1212
*

pages/src/pages/[lang]/prettier.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const { lang } = Astro.params as { lang: Lang };
5757
lang="nsjs"
5858
code={`const x = 1 ;
5959
function greet^8name^9 ^[
60-
const msg=^2^3hello, ^2^;name;
60+
const msg=^2^6hello, ^2^;name;
6161
console.log^8msg^9 ;
6262
return msg ;
6363
^]`}
@@ -67,7 +67,7 @@ console.log^8msg^9 ;
6767
lang="nsjs"
6868
code={`const x ^- 1;
6969
function greet^8name^9 ^[
70-
const msg ^- ^2^3hello, ^2 ^; name;
70+
const msg ^- ^2^6hello, ^2 ^; name;
7171
console.log^8msg^9;
7272
return msg;
7373
^]`}

pages/src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ const lang: Lang = "en";
213213
<CodeBlock
214214
lang="nsjs"
215215
code={`// src/index.nsjs
216-
const name ^- ^2^3no^3shift.js^2;
217-
console.log^8^2^3hello from ^2 ^; name ^; ^2!^2^9;`}
216+
const name ^- ^2^6no^6shift.js^2;
217+
console.log^8^2^6hello from ^2 ^; name ^; ^2!^2^9;`}
218218
/>
219219

220220
<p id="compiles-to">{t("en", "home.compilesTo")}</p>

pages/src/pages/playground.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ const currentPath = `/playground/`;
324324
});
325325

326326
// initial template
327-
srcCode.value = "console.log^8^2^3hello, ^3world!^2^9;";
327+
srcCode.value = "console.log^8^2^6hello, ^6world!^2^9;";
328328
outCode.value = "Loading compiler module...";
329329

330330
// Dynamically load the module

0 commit comments

Comments
 (0)