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

Commit

Permalink
Merge pull request #92 from Galadirith/fix/markdown-it-instantiation
Browse files Browse the repository at this point in the history
Correct instantiation conditions for markdown-it
  • Loading branch information
Galadirith committed Sep 3, 2015
2 parents 6853bee + 69f8a5a commit f0264af
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 f0264af

Please sign in to comment.