Skip to content

Commit f360bc2

Browse files
authored
fix: Novelight Line Spacing (#1980)
1 parent 550ba44 commit f360bc2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

plugins/english/novelight.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { storage } from '@libs/storage';
1010
class Novelight implements Plugin.PagePlugin {
1111
id = 'novelight';
1212
name = 'Novelight';
13-
version = '1.1.3';
13+
version = '1.1.4';
1414
icon = 'src/en/novelight/icon.png';
1515
site = 'https://novelight.net/';
1616

@@ -232,8 +232,10 @@ class Novelight implements Plugin.PagePlugin {
232232
return res.content;
233233
});
234234

235-
const loadedCheerio = parseHTML(body);
236-
const chapterText = loadedCheerio('.' + className).html() || '';
235+
const $ = parseHTML(body);
236+
$('script').remove();
237+
$(`.${className} > *:not(br)`).after('<br>');
238+
const chapterText = $('.' + className).html() || '';
237239

238240
return chapterText.replace(
239241
/class="advertisment"/g,

0 commit comments

Comments
 (0)