mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
feat: filter empty lines in subtitle rendering for improved display
This commit is contained in:
1 parent
1e63b8dc83
commit
c9d2d6c194
5 files changed
+7
-6
No files matched your search
@@ -78,10 +78,11 @@ export default class Subtitle extends Component {
|
||||
.map((cue, index) =>
|
||||
cue.text
|
||||
.split(/\r?\n/)
|
||||
.filter((line) => line.trim())
|
||||
.map(
|
||||
(item) =>
|
||||
(line) =>
|
||||
`<div class="art-subtitle-line" data-group="${index}">
|
||||
${subtitle.escape ? escape(item) : item}
|
||||
${subtitle.escape ? escape(line) : line}
|
||||
</div>`,
|
||||
)
|
||||
.join(''),
|
||||
|
||||
Reference in new issue
Block a user