Skip to content

Commit

Permalink
mark marker as dirty, not section, when applying or removing markup
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Sep 17, 2015
1 parent 6940ecd commit 7d91956
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/js/editor/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ class PostEditor {
applyMarkupToRange(range, markup) {
this.splitMarkers(range).forEach(marker => {
marker.addMarkup(markup);
this._markDirty(marker.section);
this._markDirty(marker);
});
}

Expand Down Expand Up @@ -573,10 +573,9 @@ class PostEditor {
* @private
*/
removeMarkupFromRange(range, markupOrMarkupCallback) {
const markers = this.splitMarkers(range);
markers.forEach(marker => {
this.splitMarkers(range).forEach(marker => {
marker.removeMarkup(markupOrMarkupCallback);
this._markDirty(marker.section);
this._markDirty(marker);
});
}

Expand Down

0 comments on commit 7d91956

Please sign in to comment.