mirror of
https://github.com/h7x4/unofficial_jisho_api_dart.git
synced 2025-09-10 04:53:45 +02:00
Fix definitionAbstract jquery loop
This commit is contained in:
@@ -363,8 +363,13 @@ List<String> getNotes(Element child) => child.text.split('\n');
|
|||||||
String getMeaning(Element child) => child.querySelector('.meaning-meaning').text;
|
String getMeaning(Element child) => child.querySelector('.meaning-meaning').text;
|
||||||
|
|
||||||
String getMeaningAbstract(Element child) {
|
String getMeaningAbstract(Element child) {
|
||||||
|
final meaningAbstract = child.querySelector('.meaning-abstract');
|
||||||
|
if (meaningAbstract == null) return null;
|
||||||
|
|
||||||
|
for (var element in meaningAbstract.querySelectorAll('a')) {
|
||||||
|
element.remove();
|
||||||
|
}
|
||||||
|
|
||||||
child.querySelector('.meaning-abstract')?.querySelector('a')?.remove(); //TODO: Loop remove
|
|
||||||
return child.querySelector('.meaning-abstract')?.text;
|
return child.querySelector('.meaning-abstract')?.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user