fix: fix parsing of mercurial in dragon-item-parser
This commit is contained in:
@@ -544,11 +544,15 @@ function parseEffects(description: string): ItemEffect[] {
|
||||
const activeMatch = line.match(/^<active>([^<]*)<\/active>(.*)$/i)
|
||||
if (activeMatch) {
|
||||
const remainingContent = activeMatch[2].trim()
|
||||
// Skip lines that are just "ACTIVE" labels (like "(0s)" cooldown indicators)
|
||||
const effectName = activeMatch[1].trim()
|
||||
if (effectName.toUpperCase() === 'ACTIVE' && remainingContent.match(/^\([^)]*\)\s*$/)) {
|
||||
// This is just a cooldown label, skip it
|
||||
continue
|
||||
|
||||
// Skip lines that are just "ACTIVE" labels
|
||||
// This includes: standalone "ACTIVE", or "ACTIVE" followed by cooldown like "(0s)"
|
||||
if (effectName.toUpperCase() === 'ACTIVE') {
|
||||
// Skip if it's just "ACTIVE" with no other content, or just a cooldown indicator
|
||||
if (!remainingContent || remainingContent.match(/^\([^)]*\)\s*$/)) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if (!remainingContent) {
|
||||
|
||||
Reference in New Issue
Block a user