File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { Plugin } from '@/types/plugin';
66class NovelUpdates implements Plugin . PluginBase {
77 id = 'novelupdates' ;
88 name = 'Novel Updates' ;
9- version = '0.9.11 ' ;
9+ version = '0.9.12 ' ;
1010 icon = 'src/en/novelupdates/icon.png' ;
1111 customCSS = 'src/en/novelupdates/customCSS.css' ;
1212 site = 'https://www.novelupdates.com/' ;
@@ -617,6 +617,16 @@ class NovelUpdates implements Plugin.PluginBase {
617617 // 5. All lines from the content segment are paragraphs.
618618 chapterContent = lines . map ( ( p : string ) => `<p>${ p } </p>` ) . join ( '\n' ) ;
619619
620+ // Clean up custom markup tags:
621+ // Format [dialogue speaker="Name"]text[/dialogue] as "Name: text", drop [sfx] blocks entirely
622+ chapterContent = chapterContent
623+ . replace (
624+ / \[ d i a l o g u e \s + s p e a k e r = " ( [ ^ " ] * ) " \] ( .* ?) \[ \/ d i a l o g u e \] / gi,
625+ '$1: $2' ,
626+ )
627+ . replace ( / \[ s f x \] .* ?\[ \/ s f x \] / gi, '' )
628+ . replace ( / \[ \/ ? ( d i a l o g u e | s f x ) [ ^ \] ] * \] / gi, '' ) ;
629+
620630 break ;
621631 }
622632 // Last edited in 0.9.0 by Batorian - 19/03/2025
You can’t perform that action at this time.
0 commit comments