Skip to content

Commit 35d8556

Browse files
committed
fix(cil): output union result
1 parent 1230d4b commit 35d8556

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"babel-core": "^6.24.0",
5151
"babel-preset-latest": "^6.24.0",
5252
"clone": "^2.1.1",
53-
"concat-stream": "^1.6.0"
53+
"concat-stream": "^1.6.0",
54+
"lodash.union": "^4.6.0"
5455
}
5556
}

src/create-textlint-rule-example.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// MIT © 2017 azu
22
"use strict";
33
const getRuleTest = require("./get-rule-test");
4+
const union = require("lodash.union");
45
const defaultOptions = {
56
prependValidExample: "**OK**:",
67
prependInValidExample: "**NG**:",
@@ -25,12 +26,12 @@ module.exports = function(content, options = {}) {
2526

2627
const validExample = `
2728
\`\`\`
28-
${plainValid.join(exampleSeparator)}
29+
${union(plainValid).join(exampleSeparator)}
2930
\`\`\`
3031
`;
3132
const invalidExample = `
3233
\`\`\`
33-
${plainInvalid.map(test => test.text).join(exampleSeparator)}
34+
${union(plainInvalid.map(test => test.text)).join(exampleSeparator)}
3435
\`\`\`
3536
`;
3637

0 commit comments

Comments
 (0)