Skip to content

Instantly share code, notes, and snippets.

@pierrel
Created January 6, 2012 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pierrel/1572979 to your computer and use it in GitHub Desktop.
Save pierrel/1572979 to your computer and use it in GitHub Desktop.
word boundary text.js specs
it("adds zero-width breaking spaces betwee<wbr>n special characters in the 'content'", function() {
expect(EM.Text.fromBBF({content:"<span class=\"some-class\" style=\"font-size:10\" special chars %^&amp;*"}).get('content'))
.toBe("something containing special chars %<wbr>^<wbr>&<wbr>amp;<wbr>*");
});
it("preserves the original content in 'raw_content'", function() {
expect(EM.Text.fromBBF({content:"something containing special chars %^&amp;*"}).get('raw_content'))
.toBe("something containing special chars %^&amp;*");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment