diff options
Diffstat (limited to 'ext/fg')
| -rw-r--r-- | ext/fg/js/util.js | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/ext/fg/js/util.js b/ext/fg/js/util.js index 445efa5b..e5705ffd 100644 --- a/ext/fg/js/util.js +++ b/ext/fg/js/util.js @@ -182,7 +182,7 @@ function docSentenceExtract(source, extent) {      quoteStack = []; -    let endPos = content.length - 1; +    let endPos = content.length;      for (let i = position; i <= endPos; ++i) {          const c = content[i]; @@ -205,7 +205,7 @@ function docSentenceExtract(source, extent) {      }      const text = content.substring(startPos, endPos); -    const padding = text.length - text.replace(/^\s+/, ''); +    const padding = text.length - text.replace(/^\s+/, '').length;      return {          text: text.trim(), |