Skip to content

Commit 1c47c35

Browse files
committed
Rewrite and vastly alter.
* Removes dependencies (min-util, min-qs). * Changes dev-only dependencies to devDependencies. chunpu#12 * Removes the website and browser builds. You can use wzrd.in to bundle automatically. chunpu#12 * Fixes nested lists. chunpu#11 chunpu#4 chunpu#3 * Fixes links to show the link text. chunpu#13 * Adds more newlines to ensure blocks work as expected. * Corrects tables. * Sets a default highlighting of "none" when no language is specified. * Command-line program can read from stdin. chunpu#10 * A pretty comprehensive suite of tests to ensure the library still works.
1 parent bfdc8d2 commit 1c47c35

29 files changed

+1401
-4750
lines changed

.editorconfig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# EditorConfig is awesome:
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
23

34
root = true
45

56
[*]
6-
charset = utf-8
7-
indent_style = tab
87
end_of_line = lf
9-
insert_final_newline = true
8+
charset = utf-8
109
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
indent_style = space
12+
indent_size = 4

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage/
2+
node_modules/

.eslintrc.yaml

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
parserOptions:
2+
ecmaVersion: 6
3+
env:
4+
es6: true
5+
jasmine: true
6+
node: true
7+
extends:
8+
- eslint:recommended
9+
rules:
10+
accessor-pairs: error
11+
array-bracket-spacing:
12+
- error
13+
- never
14+
array-callback-return: error
15+
arrow-body-style:
16+
- error
17+
- always
18+
arrow-parens: error
19+
arrow-spacing: error
20+
block-spacing:
21+
- error
22+
- never
23+
brace-style: error
24+
comma-dangle: error
25+
comma-spacing: error
26+
comma-style: error
27+
complexity:
28+
- error
29+
- 10
30+
computed-property-spacing: error
31+
consistent-return: error
32+
consistent-this: error
33+
constructor-super: error
34+
curly: error
35+
default-case: error
36+
dot-notation: error
37+
eol-last: error
38+
eqeqeq: error
39+
generator-star-spacing: error
40+
global-require: off
41+
guard-for-in: error
42+
indent: error
43+
init-declarations:
44+
- error
45+
- never
46+
jsx-quotes: error
47+
key-spacing: error
48+
keyword-spacing: error
49+
linebreak-style: error
50+
lines-around-comment:
51+
- error
52+
-
53+
allowBlockStart: true
54+
allowObjectStart: true
55+
allowArrayStart: true
56+
max-statements-per-line: error
57+
new-cap: error
58+
new-parens: error
59+
newline-after-var: error
60+
newline-before-return: error
61+
no-alert: error
62+
no-array-constructor: error
63+
no-bitwise: error
64+
no-caller: error
65+
no-case-declarations: error
66+
no-catch-shadow: error
67+
no-class-assign: error
68+
no-cond-assign: error
69+
no-confusing-arrow: error
70+
no-console: off
71+
no-const-assign: error
72+
no-constant-condition: error
73+
no-continue: error
74+
no-delete-var: error
75+
no-dupe-args: error
76+
no-dupe-class-members: error
77+
no-dupe-keys: error
78+
no-duplicate-case: error
79+
no-duplicate-imports: error
80+
no-else-return: error
81+
no-empty: error
82+
no-empty-character-class: error
83+
no-empty-pattern: error
84+
no-eq-null: error
85+
no-eval: error
86+
no-extend-native: error
87+
no-extra-bind: error
88+
no-extra-boolean-cast: error
89+
no-extra-label: error
90+
no-extra-parens: error
91+
no-extra-semi: error
92+
no-fallthrough: error
93+
no-func-assign: error
94+
no-implied-eval: error
95+
no-inline-comments: error
96+
no-inner-declarations: error
97+
no-invalid-this: error
98+
no-invalid-regexp: error
99+
no-irregular-whitespace: error
100+
no-iterator: error
101+
no-label-var: error
102+
no-labels: error
103+
no-lone-blocks: error
104+
no-lonely-if: error
105+
no-loop-func: error
106+
no-mixed-spaces-and-tabs: error
107+
no-multi-spaces: error
108+
no-multi-str: error
109+
no-multiple-empty-lines:
110+
- error
111+
-
112+
max: 2
113+
no-native-reassign: error
114+
no-negated-condition: error
115+
no-nested-ternary: error
116+
no-new: error
117+
no-new-func: error
118+
no-new-object: error
119+
no-new-symbol: error
120+
no-new-wrappers: error
121+
no-obj-calls: error
122+
no-octal: error
123+
no-octal-escape: error
124+
no-path-concat: error
125+
no-plusplus: error
126+
no-process-exit: error
127+
no-proto: error
128+
no-redeclare: error
129+
no-regex-spaces: error
130+
no-restricted-globals: error
131+
no-return-assign: error
132+
no-script-url: error
133+
no-self-assign: error
134+
no-self-compare: error
135+
no-sequences: error
136+
no-shadow: error
137+
no-shadow-restricted-names: error
138+
no-spaced-func: error
139+
no-sparse-arrays: error
140+
no-sync: error
141+
no-ternary: error
142+
no-this-before-super: error
143+
no-throw-literal: error
144+
no-trailing-spaces: error
145+
no-undef: error
146+
no-undef-init: error
147+
no-undefined: error
148+
no-underscore-dangle: error
149+
no-unexpected-multiline: error
150+
no-unmodified-loop-condition: error
151+
no-unneeded-ternary: error
152+
no-unreachable: error
153+
no-unsafe-finally: error
154+
no-unused-expressions: error
155+
no-unused-labels: error
156+
no-unused-vars: error
157+
no-use-before-define: error
158+
no-useless-call: error
159+
no-useless-computed-key: error
160+
no-useless-concat: error
161+
no-useless-constructor: error
162+
no-useless-escape: error
163+
no-void: error
164+
no-warning-comments: warn
165+
no-whitespace-before-property: error
166+
no-with: error
167+
object-curly-spacing: error
168+
object-property-newline: error
169+
object-shorthand: error
170+
one-var: error
171+
operator-assignment: error
172+
operator-linebreak:
173+
- error
174+
- none
175+
padded-blocks:
176+
- error
177+
- never
178+
prefer-arrow-callback:
179+
- error
180+
-
181+
allowNamedFunctions: true
182+
prefer-const: error
183+
prefer-template: error
184+
quote-props:
185+
- error
186+
- as-needed
187+
quotes: error
188+
radix: error
189+
require-jsdoc:
190+
- error
191+
-
192+
require:
193+
FunctionDeclaration: true
194+
MethodDefinition: true
195+
ClassDeclaration: true
196+
require-yield: error
197+
semi: error
198+
semi-spacing: error
199+
sort-imports: error
200+
sort-vars:
201+
- error
202+
-
203+
ignoreCase: true
204+
space-before-blocks: error
205+
space-before-function-paren:
206+
- error
207+
-
208+
anonymous: always
209+
named: never
210+
space-in-parens: error
211+
space-infix-ops:
212+
- error
213+
-
214+
int32Hint: false
215+
space-unary-ops: error
216+
spaced-comment: error
217+
strict: error
218+
template-curly-spacing: error
219+
use-isnan: error
220+
valid-jsdoc:
221+
- error
222+
-
223+
prefer:
224+
returns: return
225+
preferType:
226+
object: Object
227+
String: string
228+
requireParamDescription: false
229+
requireReturn: false
230+
requireReturnDescription: false
231+
valid-typeof: error
232+
vars-on-top: error
233+
wrap-iife: error
234+
yield-star-spacing: error

.gitignore

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
node_modules
1+
# OS-specific
2+
.DS_Store
3+
._*
4+
.Trash*
5+
$*
6+
7+
# Keys and Certs
8+
*.pem
9+
*.crt
10+
*.csr
11+
*.key
12+
13+
# Backup files
14+
*.sw[g-p]
15+
*.bak
16+
*~
17+
*#
18+
19+
# IDEs
20+
*.as3proj
21+
.buildpath
22+
.c9revisions/
23+
.cproject
24+
.project
25+
.idea/
26+
.settings*
27+
.metadata/
28+
nbproject/
29+
30+
# Generated things, may not be applicable to your project
31+
/coverage/
32+
/node_modules/
33+
npm-debug.log

.istanbul.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
instrumentation:
2+
excludes:
3+
- spec/**/*.js
4+
include-all-sources: true

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
language: node_js
2-
branches:
3-
only:
4-
- gh-pages
2+
node_js:
3+
- "4"
4+
- "5"
5+
- "6.0"
6+
- "6"
7+
before_install:
8+
- npm install -g npm@latest

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CHANGELOG
2+
=========
3+
4+
5+
2.0.0 - 2017-03-16
6+
------------------
7+
8+
* Rewrite from original `markdown2confluence` to address known issues, include additional tests, reduce dependencies.

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Contributing
2+
============
3+
4+
Here's a quick list of tips for contributing to this project:
5+
6+
1. We follow the Tests Always Included [Style Guide].
7+
2. You should make sure your editor uses [EditorConfig] so you can follow our whitespace rules easily. This is optional, but a convenient way to configure your editor to match our style.
8+
3. Since this is JavaScript, please lint with [ESLint].
9+
10+
Thanks for helping out!
11+
12+
[EditorConfig]: http://editorconfig.org/
13+
[ESLint]: http://eslint.org/
14+
[Style Guide]: https://tests-always-included.github.io/style-guide/

LICENSE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Copyright 2014-2016 chunpu <[email protected]>
2+
Copyright 2017 Connected World Services
3+
4+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

0 commit comments

Comments
 (0)