Skip to content

Commit 74fc239

Browse files
committed
Modified Bilibili Parser to accept tagsoup in XML. Fixes #18.
1 parent 2a4a74f commit 74fc239

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

build/CommentCoreLibrary.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/libxml.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function CommentLoader(url,xcm,mode){
2424
f.loadXML(xmlhttp.responseText);
2525
cm.load(BilibiliParser(f, xmlhttp.responseText));
2626
}else{
27-
cm.load(BilibiliParser(xmlhttp.responseXML, xmlHTTP.responseText));
27+
cm.load(BilibiliParser(xmlhttp.responseXML, xmlhttp.responseText));
2828
}
2929
}else if(mode == 'acfun'){
3030
cm.load(AcfunParser(xmlhttp.responseText));

tests/invalid/no_closing.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<chatid>91236</chatid>
44
<source>k-v</source>
55
<d p="0,1,25,16777215,1296965347,0,c4c06db0,14089276">[1]-。-</d>
6-
<d p="1000,1,25,16777215,1296965353,0,c4c06db0,14089285">[2]路过</d>
7-
<d p="2000,1,25,16777215,1296965413,0,c4c06db0,14089404">[3]说真的原曲好听很多</d>
8-
<d p="3000,1,25,16777215,1299993365,0,Dea1a7cd,18515460">[4]音响坏了?
9-
<d p="4000,1,25,16777215,1309012585,0,D75a006c,32875515">[5]喜欢这个啊</d>
10-
<d p="5000,1,25,16777215,1310784225,0,D31ffff4,36898041">[6]= =</d>
11-
<d p="6000,1,25,16777215,1310784237,0,D31ffff4,36898069">[7]G_&lt;</d>
12-
</i>
6+
<d p="1,1,25,16777215,1296965353,0,c4c06db0,14089285">[2]路过</d>
7+
<d p="2,1,25,16777215,1296965413,0,c4c06db0,14089404">[3]说真的原曲好听很多</d>
8+
<d p="3,1,25,16777215,1299993365,0,Dea1a7cd,18515460">[4]音响坏了?
9+
<d p="4,1,25,16777215,1309012585,0,D75a006c,32875515">[5]喜欢这个啊</d>
10+
<d p="5,1,25,16777215,1310784225,0,D31ffff4,36898041">[6]= =</d>
11+
<d p="6,1,25,16777215,1310784237,0,D31ffff4,36898069">[7]G_&lt;</d>
12+
</i>

tests/invalid/syntax_error.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<chatid>91236</chatid>
44
<source>k-v</source>
55
<d p="0,1,25,16777215,1296965347,0,c4c06db0,14089276">[1]-。-</d>
6-
<d p="1000,1,25,16777215,1296965353,0,c4c06db0,14089285">[2]路过</d>
7-
<d p="2000,1,25,16777215,1296965413,0,c4c06db0,14089404">[3]说真的原曲好听很多</d>
8-
<d p="3000,1,25,16777215,1299993365,0,Dea1a7cd,18515460"[4]音响坏了?</d>
9-
<d p="4000,1,25,16777215,1309012585,0,D75a006c,32875515">[5]喜欢这个啊</d>
10-
<d p="5000,1,25,16777215,1310784225,0,D31ffff4,36898041">[6]= =</d>
11-
<d p="6000,1,25,16777215,1310784237,0,D31ffff4,36898069">[7]G_&lt;</d>
12-
</i>
6+
<d p="1,1,25,16777215,1296965353,0,c4c06db0,14089285">[2]路过</d>
7+
<d p="2,1,25,16777215,1296965413,0,c4c06db0,14089404">[3]说真的原曲好听很多</d>
8+
<d p="3,1,25,16777215,1299993365,0,Dea1a7cd,18515460"[4]音响坏了?</d>
9+
<d p="4,1,25,16777215,1309012585,0,D75a006c,32875515">[5]喜欢这个啊</d>
10+
<d p="5,1,25,16777215,1310784225,0,D31ffff4,36898041">[6]= =</d>
11+
<d p="6,1,25,16777215,1310784237,0,D31ffff4,36898069">[7]G_&lt;</d>
12+
</i>

0 commit comments

Comments
 (0)