Permalink
Browse files

Fixed encoding bug, and a couple small tweaks

Also removed extraneous whitespace from encoded string
  • Loading branch information...
1 parent 8d3b5d7 commit 9a68e1da7487f78e6fce534565ec9f5de7539466 @amadeus committed May 8, 2012
Showing with 4 additions and 7 deletions.
  1. +4 −7 Source/SimpleParse.js
View
@@ -54,7 +54,7 @@ var SimpleParse = window.SimpleParse = {
});
});
- return reference.string;
+ return reference.string.trim();
},
decode: function(string){
@@ -98,9 +98,6 @@ var SimpleParse = window.SimpleParse = {
},
decode: function(string){
- // TODO: Parse out links...
-
- // Add to section
return {
type: 'paragraph',
content: string.trim()
@@ -128,10 +125,10 @@ var Internal = {
// First check to see if we have a data model this module
Object.each(SimpleParse.Modules, function(obj, key){
if (parsedModule) return;
- var match = key.toUpperCase() + ':', module;
+ var match = key.toUpperCase() + ':', module, cleaned;
if (string.startsWith(match)) {
- string = Internal.cleanKeyFromString(key, string);
- module = obj.decode(string);
+ cleaned = Internal.cleanKeyFromString(key, string);
+ module = obj.decode(cleaned);
if (!module) return;
reference.section.modules.push(module);
parsedModule = true;

0 comments on commit 9a68e1d

Please sign in to comment.