From dbad9338e18ed8be0ed6d9ba4d3e71bd729353c0 Mon Sep 17 00:00:00 2001 From: Rocky Duan Date: Thu, 26 Jul 2012 16:01:57 -0400 Subject: [PATCH] removed unnecessary/commented out lines --- lms/static/coffee/src/customwmd.coffee | 67 -------------------------- 1 file changed, 67 deletions(-) diff --git a/lms/static/coffee/src/customwmd.coffee b/lms/static/coffee/src/customwmd.coffee index 6b3a040a35..e893ddf0d1 100644 --- a/lms/static/coffee/src/customwmd.coffee +++ b/lms/static/coffee/src/customwmd.coffee @@ -27,19 +27,6 @@ $ -> (?!`) ///gm - ###HUB.Queue -> - console.log "initializing" - renderReady = true - HUB.processUpdateTime = 50 - HUB.Config - "HTML-CSS": - EqnChunk: 10 - EqnChunkFactor: 1 - SVG: - EqnChunk: 10 - EqnChunkFactor: 1 - ### - @processMath: (start, last, preProcess) => block = blocks.slice(start, last + 1).join("").replace(/&/g, "&") .replace(/ math = null text - @updateMathJax: => - HUB.Queue(["Typeset", HUB, "wmd-preview"]) - - - - ### - if not HUB.Cancel? #and 1 == 2 - HUB.cancelTypeset = false - CANCELMESSAGE = "MathJax Canceled" - - HOOKS = [ - { - name: "HTML-CSS Jax Config" - engine: -> window["MathJax"].OutputJax["HTML-CSS"] - }, - { - name: "SVG Jax Config" - engine: -> window["MathJax"].OutputJax["SVG"] - }, - { - name: "TeX Jax Config" - engine: -> window["MathJax"].InputJax.TeX - }, - ] - - for hook in HOOKS - do (hook) -> - HUB.Register.StartupHook hook.name, -> - engine = hook.engine() - engine.Augment - Translate: (script, state) -> - console.log "translating" - if HUB.cancelTypeset or state.cancelled - throw Error(CANCELMESSAGE) - engine.Translate.call(engine, script, state) - - prevProcessError = HUB.processError - HUB.processError = (error, state, type) -> - if error.message != CANCELMESSAGE - return prevProcessError.call(HUB, error, state, type) - else - console.log "handling message" - MathJax.Message.Clear(0, 0) - state.jaxIds = [] - state.jax = {} - state.scripts = [] - state.i = state.j = 0 - state.cancelled = true - return null - - HUB.Cancel = -> - this.cancelTypeset = true - ### - if Markdown? converter = Markdown.getSanitizingConverter() editor = new Markdown.Editor(converter)