Skip to content

Commit

Permalink
bump and realize copy paste is b0rked
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcLear committed Jan 22, 2015
1 parent 1f9979d commit 5cef77d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Enjoy.
TODO:

* Tests
* Copy / Paste
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ep_mathjax",
"description": "Show LaTeX STylee Math formulas powered by CodeCog NOT Mathjax",
"version": "0.0.5",
"version": "0.0.7",
"author": {
"name": "johnyma22",
"email": "john@mclear.co.uk",
Expand Down
2 changes: 1 addition & 1 deletion static/js/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ exports.aceCreateDomLine = function(hook_name, args, cb) {
}
}
var img = "http://latex.codecogs.com/gif.latex?"+unescape(value);
return cb([{cls: clss.join(" "), extraOpenTags: "<span class='mathjaxcontainer'><span class='mathjax'><img src='" + img + "'></span><span class='character'>", extraCloseTags: '</span></span>'}]);
return cb([{cls: clss.join(" "), extraOpenTags: "<span class='mathjaxcontainer "+value+"'><span class='mathjax'><img src='" + img + "'></span><span class='character'>", extraCloseTags: '</span></span>'}]);
}
return cb();
};
Expand Down
6 changes: 5 additions & 1 deletion static/js/shared.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
var collectContentPre = function(hook, context){

var cls = context.cls;
var tname = context.tname;
var state = context.state;
var lineAttributes = state.lineAttributes

var tagIndex = cls.indexOf("mathjax");
if(tagIndex === 0){
lineAttributes['mathjax'] = tags[tagIndex];
// console.log(context);
var cls = cls.split(" ");
// console.log(cls[1]);
lineAttributes['mathjax'] = cls[1];
}

var tagIndex = cls.indexOf("mathjax");
Expand Down

0 comments on commit 5cef77d

Please sign in to comment.