File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
public/js/lib/editor/markdown-lint Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change
1
+ /* global CodeMirror */
1
2
import markdownlint from 'markdownlint'
2
3
3
4
// load CM lint plugin explicitly
4
- import 'script-loader! @hackmd/codemirror/addon/lint/lint'
5
+ import '@hackmd/codemirror/addon/lint/lint'
5
6
import './lint.css'
6
7
7
- ( function ( mod ) {
8
- mod ( CodeMirror ) ;
9
- } ) ( function ( CodeMirror ) {
10
- function validator ( text ) {
8
+ ( function ( mod ) {
9
+ mod ( CodeMirror )
10
+ } ) ( function ( CodeMirror ) {
11
+ function validator ( text ) {
11
12
return lint ( text ) . map ( error => {
12
13
const {
13
14
ruleNames,
@@ -17,7 +18,7 @@ import './lint.css'
17
18
} = error
18
19
const lineNumber = ln - 1
19
20
20
- let start = 0 , end = - 1
21
+ let start = 0 ; let end = - 1
21
22
if ( errorRange ) {
22
23
[ start , end ] = errorRange . map ( r => r - 1 )
23
24
}
Original file line number Diff line number Diff line change @@ -464,6 +464,11 @@ module.exports = {
464
464
loader : 'url-loader' ,
465
465
options : { limit : '10000' , mimetype : 'image/gif' }
466
466
} ]
467
+ } , {
468
+ test : / @ h a c k m d \/ c o d e m i r r o r \/ a d d o n \/ l i n t \/ l i n t / ,
469
+ use : [ {
470
+ loader : 'script-loader'
471
+ } ]
467
472
} ]
468
473
} ,
469
474
node : {
You can’t perform that action at this time.
0 commit comments