Commit 37af0df8 authored by Smari McCarthy's avatar Smari McCarthy
Browse files

doConversions

parent efa2350a
......@@ -16,6 +16,7 @@ function Marka(target) {
}
this.match();
this.doConversions();
}
Marka.prototype.match = function() {
......@@ -41,11 +42,24 @@ Marka.prototype.match = function() {
})
};
Marka.prototype.doConversions = function() {
var self = this;
$(".marka").each(function(index, value) {
var text = $(value).text();
self.splitSymbols(text);
});
}
Marka.prototype.splitSymbols = function(text) {
var numbers = /[\d,.]+/;
var number = text.match(numbers);
var number = text.match(numbers)[0];
var residual = text.replace(numbers, "");
console.log(number, residual);
var symbol = this.findSymbol(residual);
return {number: number, symbol: symbol};
}
Marka.prototype.findSymbol = function(text) {
}
Marka.prototype.wrapNode = function() {
......
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