Skip to content

Commit

Permalink
fix empty footnote not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pathnirvana committed Mar 16, 2024
1 parent 9a96c88 commit e2d13cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/static/text/mn-3-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2624,7 +2624,7 @@
},
{
"type": "footnote",
"text": "4."
"text": "4. remove?"
},
{
"type": "footnote",
Expand Down
4 changes: 2 additions & 2 deletions src/components/TextTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ export default {
return {...entry, parts: this.textParts(text) }
},
processFootnote(fnote, language) {
let _0, number, content, text = beautifyText(fnote.text, language, this.$store.state)
let _0, number = '', content = '', text = beautifyText(fnote.text, language, this.$store.state)
const m = /^([^\s\.\{\}]+)[\.\s]([\s\S]+)$/.exec(text) // [\s\S]+ needed for matching new lines
if (m) [_0, number, content] = m
if (language == 'pali') {
if (language == 'pali' && content) {
// find available abbr and create parts for those
const abbrs = content.split(';').map(variant => variant.split('')).filter(vpart => vpart.length > 1)
.map(vpart => vpart[1].split(',')).flat().map(a => a.trim()).filter(a => this.$store.state.footnoteAbbreviationKeys.includes(a))
Expand Down

0 comments on commit e2d13cd

Please sign in to comment.