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 */
12import markdownlint from 'markdownlint'
23
34// load CM lint plugin explicitly
4- import 'script-loader! @hackmd/codemirror/addon/lint/lint'
5+ import '@hackmd/codemirror/addon/lint/lint'
56import './lint.css'
67
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 ) {
1112 return lint ( text ) . map ( error => {
1213 const {
1314 ruleNames,
@@ -17,7 +18,7 @@ import './lint.css'
1718 } = error
1819 const lineNumber = ln - 1
1920
20- let start = 0 , end = - 1
21+ let start = 0 ; let end = - 1
2122 if ( errorRange ) {
2223 [ start , end ] = errorRange . map ( r => r - 1 )
2324 }
Original file line number Diff line number Diff line change @@ -464,6 +464,11 @@ module.exports = {
464464 loader : 'url-loader' ,
465465 options : { limit : '10000' , mimetype : 'image/gif' }
466466 } ]
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+ } ]
467472 } ]
468473 } ,
469474 node : {
You can’t perform that action at this time.
0 commit comments