File tree Expand file tree Collapse file tree 2 files changed +11
-16
lines changed Expand file tree Collapse file tree 2 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 1
- import { parse } from "https://unpkg.com/@progfay/scrapbox-parser" ;
2
1
import hljs from "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/es/highlight.min.js" ;
2
+ import { parse } from "https://unpkg.com/@progfay/scrapbox-parser" ;
3
3
4
4
document . getElementById ( "parse-button" ) . addEventListener ( "click" , ( ) => {
5
- const parsedJson = JSON . stringify (
6
- parse ( document . getElementById ( "plain-text" ) . value ) ,
7
- null ,
8
- 2
9
- ) . trim ( ) ;
10
- const a = hljs . highlight ( parsedJson , { language : "json" } ) . value ;
11
- console . log ( a ) ;
12
- document . querySelector ( "#parsed-json>.json" ) . innerHTML = a ;
5
+ const parsedJson = JSON . stringify (
6
+ parse ( document . getElementById ( "plain-text" ) . value ) ,
7
+ null ,
8
+ 2 ,
9
+ ) . trim ( ) ;
10
+ const a = hljs . highlight ( parsedJson , { language : "json" } ) . value ;
11
+ console . log ( a ) ;
12
+ document . querySelector ( "#parsed-json>.json" ) . innerHTML = a ;
13
13
} ) ;
Original file line number Diff line number Diff line change 3
3
"version" : " 10.0.0" ,
4
4
"type" : " module" ,
5
5
"description" : " parse Scrapbox notation to JavaScript Object" ,
6
- "files" : [
7
- " dist"
8
- ],
6
+ "files" : [" dist" ],
9
7
"types" : " ./dist/index.d.ts" ,
10
8
"exports" : {
11
9
"." : " ./dist/index.js" ,
33
31
"type" : " git" ,
34
32
"url" : " git+https://github.com/progfay/scrapbox-parser.git"
35
33
},
36
- "keywords" : [
37
- " scrapbox" ,
38
- " parser"
39
- ],
34
+ "keywords" : [" scrapbox" , " parser" ],
40
35
"author" : " progfay" ,
41
36
"license" : " MIT" ,
42
37
"bugs" : {
You can’t perform that action at this time.
0 commit comments