Skip to content

Commit

Permalink
Render immediately when auto-render is ticked
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Jun 26, 2014
1 parent d1d601b commit 7474672
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MacDown/Code/Document/MPDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ @interface MPDocument () <NSTextViewDelegate>
@property BOOL currentSmartyPantsFlag;
@property BOOL currentSyntaxHighlighting;
@property BOOL currentMathJax;
@property BOOL currentManualRender;
@property (copy) NSString *currentHtml;
@property (copy) NSString *currentStyleName;
@property (strong) NSTimer *parseDelayTimer;
Expand Down Expand Up @@ -755,14 +756,18 @@ - (void)render
self.currentStyleName = styleName;
self.currentSyntaxHighlighting = self.preferences.htmlSyntaxHighlighting;
self.currentMathJax = self.preferences.htmlMathJax;
self.currentManualRender = self.preferences.markdownManualRender;
}

- (void)renderIfPreferencesChanged
{
if (self.preferences.htmlStyleName != self.currentStyleName
|| (self.preferences.htmlSyntaxHighlighting
!= self.currentSyntaxHighlighting)
|| (self.preferences.htmlMathJax != self.currentMathJax))
|| (self.preferences.htmlMathJax != self.currentMathJax)
|| (!self.preferences.markdownManualRender
&& (self.preferences.markdownManualRender
!= self.currentManualRender)))
[self render];
}

Expand Down

0 comments on commit 7474672

Please sign in to comment.