Skip to content

Commit

Permalink
simplify #markersFor
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Aug 25, 2015
1 parent 5449871 commit ba7f1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/models/markup-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default class Section extends LinkedItem {

if (adjustedTail > headOffset && adjustedHead < tailOffset) {
let head = Math.max(headOffset - adjustedHead, 0);
let tail = adjustedTail < tailOffset ? m.length : m.length - (adjustedTail - tailOffset);
let tail = m.length - Math.max(adjustedTail - tailOffset, 0);
let cloned = m.clone();

cloned.value = m.value.slice(head, tail);
Expand Down

0 comments on commit ba7f1b9

Please sign in to comment.