File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ export const getGistFirstFileText = async url => {
3
3
try {
4
4
const { data : gistData , error : gistError } = await xmlGetHttpRequest ( url )
5
5
if ( gistError ) res ( { error : gistError } )
6
-
7
6
// ─────────────────────────────────────────────────────
8
7
// 1. find raw link
9
8
const html = JSON . parse ( gistData ) . div
9
+ console . log ( html )
10
10
let rawLink = ""
11
11
html . split ( 'href="' ) . forEach ( text => {
12
12
const link = text . split ( '"' ) [ 0 ]
13
+ console . log ( link )
13
14
if ( link . includes ( "/raw/" ) ) rawLink = link
14
15
} )
15
16
if ( ! rawLink ) res ( { error : "raw link not found" } )
@@ -22,6 +23,7 @@ export const getGistFirstFileText = async url => {
22
23
// ─────────────────────────────────────────────────────
23
24
24
25
res ( { data : rawData } )
26
+ console . log ( data )
25
27
} catch ( e ) {
26
28
res ( { error : String ( e ) } )
27
29
}
You can’t perform that action at this time.
0 commit comments