Skip to content

Commit 837da41

Browse files
committed
.
0 parents  commit 837da41

40 files changed

+811
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.log
3+
.nyc_output/
4+
coverage/
5+
node_modules/
6+
yarn.lock

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage/
2+
*.html
3+
*.json
4+
*.md

.remarkignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test/

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- lts/dubnium
4+
- node
5+
after_script: bash <(curl -s https://codecov.io/bash)

from-markdown.js

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
var autolinkLiteral = require('mdast-util-gfm-autolink-literal/from-markdown')
2+
var strikethrough = require('mdast-util-gfm-strikethrough/from-markdown')
3+
var table = require('mdast-util-gfm-table/from-markdown')
4+
var taskListItem = require('mdast-util-gfm-task-list-item/from-markdown')
5+
6+
var own = {}.hasOwnProperty
7+
8+
module.exports = configure([
9+
autolinkLiteral,
10+
strikethrough,
11+
table,
12+
taskListItem
13+
])
14+
15+
function configure(extensions) {
16+
var config = {canContainEols: []}
17+
var length = extensions.length
18+
var index = -1
19+
20+
while (++index < length) {
21+
extension(config, extensions[index])
22+
}
23+
24+
return config
25+
}
26+
27+
function extension(config, extension) {
28+
var key
29+
var left
30+
var right
31+
32+
for (key in extension) {
33+
left = own.call(config, key) ? config[key] : (config[key] = {})
34+
right = extension[key]
35+
36+
if (key === 'canContainEols') {
37+
config[key] = [].concat(left, right)
38+
} else {
39+
Object.assign(left, right)
40+
}
41+
}
42+
}

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
exports.fromMarkdown = require('./from-markdown')
2+
exports.toMarkdown = require('./to-markdown')

license

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(The MIT License)
2+
3+
Copyright (c) 2020 Titus Wormer <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
'Software'), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

package.json

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"name": "mdast-util-gfm",
3+
"version": "0.0.0",
4+
"description": "mdast extension to parse and serialize GFM (gitHub Flavored Markdown)",
5+
"license": "MIT",
6+
"keywords": [
7+
"unist",
8+
"mdast",
9+
"mdast-util",
10+
"util",
11+
"utility",
12+
"markdown",
13+
"markup",
14+
"table",
15+
"strikethrough",
16+
"tasklist",
17+
"autolink",
18+
"tagfilter",
19+
"github",
20+
"gfm",
21+
"gfm"
22+
],
23+
"repository": "syntax-tree/mdast-util-gfm",
24+
"bugs": "https://github.com/syntax-tree/mdast-util-gfm/issues",
25+
"funding": {
26+
"type": "opencollective",
27+
"url": "https://opencollective.com/unified"
28+
},
29+
"author": "Titus Wormer <[email protected]> (https://wooorm.com)",
30+
"contributors": [
31+
"Titus Wormer <[email protected]> (https://wooorm.com)"
32+
],
33+
"files": [
34+
"from-markdown.js",
35+
"index.js",
36+
"to-markdown.js"
37+
],
38+
"dependencies": {
39+
"mdast-util-gfm-autolink-literal": "^0.1.0",
40+
"mdast-util-gfm-strikethrough": "^0.2.0",
41+
"mdast-util-gfm-table": "^0.1.0",
42+
"mdast-util-gfm-task-list-item": "^0.1.0"
43+
},
44+
"devDependencies": {
45+
"github-slugger": "^1.0.0",
46+
"hast-util-to-html": "^7.0.0",
47+
"mdast-util-from-markdown": "^0.5.0",
48+
"mdast-util-to-hast": "^9.1.2",
49+
"mdast-util-to-markdown": "^0.3.0",
50+
"micromark-extension-gfm": "^0.1.0",
51+
"node-fetch": "^2.6.1",
52+
"nyc": "^15.0.0",
53+
"prettier": "^2.0.0",
54+
"remark-cli": "^8.0.0",
55+
"remark-preset-wooorm": "^7.0.0",
56+
"tape": "^5.0.0",
57+
"xo": "^0.33.0"
58+
},
59+
"scripts": {
60+
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
61+
"crawl": "node script/crawl-tests",
62+
"test-api": "node test",
63+
"test-coverage": "nyc --reporter lcov tape test/index.js",
64+
"test": "npm run format && npm run test-coverage"
65+
},
66+
"nyc": {
67+
"check-coverage": true,
68+
"lines": 100,
69+
"functions": 100,
70+
"branches": 100
71+
},
72+
"prettier": {
73+
"tabWidth": 2,
74+
"useTabs": false,
75+
"singleQuote": true,
76+
"bracketSpacing": false,
77+
"semi": false,
78+
"trailingComma": "none"
79+
},
80+
"xo": {
81+
"prettier": true,
82+
"esnext": false,
83+
"rules": {
84+
"guard-for-in": "off",
85+
"unicorn/prefer-optional-catch-binding": "off"
86+
}
87+
},
88+
"remarkConfig": {
89+
"plugins": [
90+
"preset-wooorm"
91+
]
92+
}
93+
}

0 commit comments

Comments
 (0)