Skip to content

Instantly share code, notes, and snippets.

@lthms
Created September 10, 2018 12:42
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 lthms/b36f41229ee16bc4337308d5c9b83192 to your computer and use it in GitHub Desktop.
Save lthms/b36f41229ee16bc4337308d5c9b83192 to your computer and use it in GitHub Desktop.
#[test]
fn test_render() {
use typography::ENGLISH;
use generator::test::Html;
assert_eq!(
render_galatian_document(r#"It looks like it is working.
+I+
smiled *at
*
him. <Oh no.>(me)
but I was like... "Why not?"
And this is great.
______letter________
But why?
____________________
"#, &ENGLISH, &Html).unwrap(),
"<div class=\"story\"><p>It looks like it is working.</p><p><strong>I</strong> smiled<em> at</em> him.<span div=\"thought\"><span div=\"reply\">Oh no.</span></span></p><p>but I was like…<em> Why not&nbsp;?</em></p><p>And this is great.</p></div><div class=\"aside letter\"><p>But why&nbsp;?</p></div>");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment