cirocosta / yahtml-parser

Yet another HTML (toy) parser
GNU General Public License v2.0
0 stars 0 forks source link

Element w/ simbling text #7

Open cirocosta opened 8 years ago

cirocosta commented 8 years ago

http://www.w3.org/TR/CSS2/visuren.html#anonymous-block-level

<div>
  Some text
  <p>More text<p>
</div>
cirocosta commented 8 years ago

yabrowser is waiting for this. Currently:

  yahtml::HTMLDriver htmldriver;
  yacss::CSSDriver cssdriver;

  const char* html_source =
    "<body>"
      "<h1></h1>"
      "<h2></h2>"
      "huehue <strong>brbr</strong> huehue"
    "</body>";

  const char* css_source =
    "body, h1, h2 { display: block; }"
    "strong { display: inline; }";

  htmldriver.parse_source(html_source);
  cssdriver.parse_source(css_source);
  ASSERT_EQ(htmldriver.result + cssdriver.result, 0);

won't pass