mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
Improve first line lookup
This commit is contained in:
@@ -55,7 +55,8 @@ const parseEpisode = e => {
|
||||
if (categoryName === 'Buchclub') categoryName = 'Lesestunde'
|
||||
if (categoryName === 'reCATion') categoryName = 'Verschiedenes'
|
||||
if (categoryName === 'NostrTalk') categoryName = 'NostrTalk'
|
||||
const firstLine = descriptionPlain.split('\n').find(l => l.match(regexBlockzeit)) || ''
|
||||
const lines = descriptionPlain.trim().split('\n')
|
||||
const firstLine = lines.find(l => l.match(regexBlockzeit)) || lines[0] || ''
|
||||
const blockMatch = firstLine.match(regexBlockzeit)
|
||||
const block = blockMatch ? parseInt(blockMatch[1].replace('.', '')) : null
|
||||
const category = slugify(categoryName)
|
||||
|
||||
Reference in New Issue
Block a user