mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Add example, stop modifying files array, rename "styles".
This commit is contained in:
parent
d3e9f83e7c
commit
9917d7f2fb
7 changed files with 44 additions and 2 deletions
3
example/bad.md
Normal file
3
example/bad.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
#bad.md
|
||||
|
||||
#This file fails some rules.
|
3
example/good.md
Normal file
3
example/good.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# good.md
|
||||
|
||||
This file passes all rules.
|
21
example/standalone.js
Normal file
21
example/standalone.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
"use strict";
|
||||
|
||||
var markdownlint = require("../lib/markdownlint");
|
||||
|
||||
var options = {
|
||||
"files": [ "good.md", "bad.md" ]
|
||||
};
|
||||
|
||||
// Uses result.toString for pretty formatting
|
||||
markdownlint(options, function callback(err, result) {
|
||||
if (!err) {
|
||||
console.log(result.toString());
|
||||
}
|
||||
});
|
||||
|
||||
// Examines the result object directly
|
||||
markdownlint(options, function callback(err, result) {
|
||||
if (!err) {
|
||||
console.dir(result, { "colors": true });
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue