Skip to content

Commit

Permalink
Merge pull request #323 from fedwiki/text-extract-fix
Browse files Browse the repository at this point in the history
Extract from currentItem, not item
  • Loading branch information
paul90 authored Sep 2, 2024
2 parents 4408cac + 466a296 commit 1681b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/neighborhood.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ extractPageText = (pageText, currentItem, currentIndex) ->
when 'paragraph', 'markdown', 'html', 'reference', 'image', 'pagefold', 'math', 'mathjax', 'code'
pageText += extractItemText currentItem.text
when 'audio', 'video', 'frame'
pageText += extractItemText(item.text.split(/\r\n?|\n/)
pageText += extractItemText(currentItem.text.split(/\r\n?|\n/)
.map((line) ->
firstWord = line.split(/\p{White_Space}/u)[0]
if firstWord.startsWith('http') or firstWord.toUpperCase() is firstWord or firstWord.startsWith('//')
Expand Down

0 comments on commit 1681b54

Please sign in to comment.