Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Correct instantiation conditions for markdown-it
Browse files Browse the repository at this point in the history
  • Loading branch information
Galadirith committed Sep 2, 2015
1 parent 464847d commit 69f8a5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/markdown-it-helper.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ init = (rL) ->
markdownIt.use math, mathBrackets

needsInit = (rL) ->
markdownItOptions isnt getOptions() or markdownIt? or rL isnt renderLaTeX
not markdownIt? or
markdownItOptions.breaks isnt atom.config.get('markdown-preview-plus.breakOnSingleNewline') or
rL isnt renderLaTeX

exports.render = (text, rL) ->
init(rL) if needsInit(rL)
Expand Down

0 comments on commit 69f8a5a

Please sign in to comment.