Commit dc52a918 authored by Smari McCarthy's avatar Smari McCarthy
Browse files

Use original value as basis for everything

parent 35a76333
......@@ -59,12 +59,17 @@ Marka.prototype.match = function() {
find: regex,
wrap: this.wrapNode()
})
$(".marka").each(function(index, value) {
var node = $(value);
node.data("original_value", node.text());
});
};
Marka.prototype.doConversions = function() {
var self = this;
$(".marka").each(function(index, value) {
var text = $(value).text();
var text = $(value).data("original_value");
var res = self.splitSymbols(text);
if (res === false) {
$(value).replaceWith(text)
......@@ -81,7 +86,6 @@ Marka.prototype.doConversions = function() {
}
node.append(children);
node.children(".marka-results").html("<span class=\"marka-result\">" + node.data("original_value") + "</span>")
})
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment