Add parser rule for hard linebreaks

This commit is contained in:
Jermolene
2013-12-14 17:05:57 +00:00
parent b1e7ba29f1
commit 6a8feb216a
4 changed files with 89 additions and 1 deletions

View File

@@ -113,6 +113,15 @@ describe("WikiText parser tests", function() {
});
it("should parse hard linebreak areas", function() {
expect(parse("\"\"\"Something\nin the\nway she moves\n\"\"\"\n\n")).toEqual(
[ { type : 'element', tag : 'p', children : [ { type : 'text', text : 'Something' }, { type : 'element', tag : 'br' }, { type : 'text', text : 'in the' }, { type : 'element', tag : 'br' }, { type : 'text', text : 'way she moves' }, { type : 'element', tag : 'br' } ] } ]
);
});
});
})();