-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
260 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# 見出し。 | ||
|
||
### 見出し。 | ||
|
||
### 見出し。 | ||
test | ||
|
||
これは,見本となる例です. | ||
|
||
785,105 | ||
|
||
785.105 | ||
|
||
0,01 | ||
|
||
0,1 | ||
|
||
これは10個あるうちの0,1分 | ||
|
||
ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙゚ | ||
|
||
オヤツは300円まで | ||
|
||
200円はダメ | ||
|
||
おやつは300円まで | ||
|
||
これはABC全角 | ||
|
||
一億百十万人 | ||
|
||
百八つのボタン | ||
|
||
第三回大会 | ||
|
||
サンフランシスコマラソン第三回大会 | ||
|
||
これは世界1 | ||
|
||
1部の文章 | ||
|
||
朝1番に | ||
|
||
数100倍 | ||
|
||
数10億 | ||
|
||
しばしば数10万行以上に | ||
|
||
数10年に一度の奇跡 | ||
|
||
JTF 標準 | ||
|
||
これは Unicode | ||
|
||
これは Unicode | ||
|
||
これは ダメ | ||
|
||
これは どういうこと? | ||
|
||
「 ダメ」 | ||
|
||
これは 「ダメ」です | ||
|
||
A氏は「5月に新製品を発売します。」と述べました。 | ||
|
||
従業員は約30,000人です(関連企業を含みます。) | ||
|
||
半角感嘆符! | ||
|
||
驚きの速さ! これが新製品のキャッチコピーでした。半角 | ||
|
||
半角疑問符? | ||
|
||
驚きの速さ!? これが新製品のキャッチコピーでした? これは問題なし | ||
|
||
18~22歳まで | ||
|
||
例:〜 | ||
|
||
クォーク(物質の素粒子) | ||
|
||
例)test | ||
|
||
半角[かっこ | ||
|
||
半角]かっこ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# 見出し | ||
|
||
### 見出し | ||
|
||
### 見出し | ||
test | ||
|
||
これは、見本となる例です。 | ||
|
||
785,105 | ||
|
||
785.105 | ||
|
||
0.01 | ||
|
||
0.1 | ||
|
||
これは10個あるうちの0.1分 | ||
|
||
ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゛゜ | ||
|
||
オヤツは300円まで | ||
|
||
200円はダメ | ||
|
||
おやつは300円まで | ||
|
||
これはABC全角 | ||
|
||
1億百十万人 | ||
|
||
108つのボタン | ||
|
||
第3回大会 | ||
|
||
サンフランシスコマラソン第3回大会 | ||
|
||
これは世界一 | ||
|
||
一部の文章 | ||
|
||
朝一番に | ||
|
||
数百倍 | ||
|
||
数十億 | ||
|
||
しばしば数十万行以上に | ||
|
||
数十年に一度の奇跡 | ||
|
||
JTF標準 | ||
|
||
これはUnicode | ||
|
||
これはUnicode | ||
|
||
これはダメ | ||
|
||
これはどういうこと? | ||
|
||
「ダメ」 | ||
|
||
これは「ダメ」です | ||
|
||
A氏は「5月に新製品を発売します」と述べました。 | ||
|
||
従業員は約30,000人です(関連企業を含みます) | ||
|
||
半角感嘆符! | ||
|
||
驚きの速さ! これが新製品のキャッチコピーでした。半角 | ||
|
||
半角疑問符? | ||
|
||
驚きの速さ!? これが新製品のキャッチコピーでした? これは問題なし | ||
|
||
18〜22歳まで | ||
|
||
例:〜 | ||
|
||
クォーク(物質の素粒子) | ||
|
||
例)test | ||
|
||
半角[かっこ | ||
|
||
半角]かっこ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// LICENSE : MIT | ||
"use strict"; | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
const glob = require("glob"); | ||
// result | ||
const RESULT = { | ||
input: [], | ||
output: [] | ||
}; | ||
function processFile(filePath) { | ||
const contents = fs.readFileSync(filePath, "utf-8"); | ||
const lines = contents.split(/\n/); | ||
const inputRegExp = /text:\s*?"(.*?)"/; | ||
const outputRegExp = /output:\s*?"(.*?)"/; | ||
lines.forEach(function (line, index) { | ||
const nextLine = lines[index + 1]; | ||
if (inputRegExp.test(line) && outputRegExp.test(nextLine)) { | ||
const inputMatch = line.match(inputRegExp)[1]; | ||
// \\n => \n | ||
RESULT.input.push(inputMatch.replace(/\\n/g, "\n")); | ||
} else if (outputRegExp.test(line)) { | ||
const outputMatch = line.match(outputRegExp)[1]; | ||
RESULT.output.push(outputMatch.replace(/\\n/g, "\n")); | ||
} | ||
}); | ||
} | ||
|
||
|
||
const testDir = path.join(__dirname, "..", "test"); | ||
const filePathList = glob.sync(testDir + "/*-test.js"); | ||
filePathList.forEach(processFile); | ||
|
||
fs.writeFileSync(path.join(testDir, "fixtures/input.md"), RESULT.input.join("\n\n"), "utf-8"); | ||
fs.writeFileSync(path.join(testDir, "fixtures/output.md"), RESULT.output.join("\n\n"), "utf-8"); |