Commit 4e68501
fix: read pre_rules/post_rules as {pattern,replacement} objects
The YAML migration changed pre_rules/post_rules to {pattern, replacement}
objects, but loadRefsFromRanges (LDS + COC) and cleanReference still read them
as [pattern, replacement] tuples (rule[0]/rule[1]). rule[0] is undefined ->
new RegExp(undefined) = /(?:)/ matches at every position, and rule[1] (undefined)
coerces to the literal string 'undefined' in String.replace — so non-English
references rendered e.g. 'undefined니undefined파...' instead of '니파이전서 1:16-17',
and Korean input parsing (pre_rules) broke the same way.
Read rule.pattern/rule.replacement (legacy tuple fallback retained) and guard the
replacement against undefined. books arrays are unchanged (still tuples).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent a33895f commit 4e68501
1 file changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
483 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
| |||
650 | 654 | | |
651 | 655 | | |
652 | 656 | | |
653 | | - | |
654 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
655 | 660 | | |
656 | 661 | | |
657 | 662 | | |
| |||
956 | 961 | | |
957 | 962 | | |
958 | 963 | | |
959 | | - | |
960 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
961 | 970 | | |
962 | 971 | | |
963 | 972 | | |
| |||
0 commit comments