Skip to content

Commit

Permalink
[html] Add line break after aside, figure, figcaption and section. Refs
Browse files Browse the repository at this point in the history
  • Loading branch information
rkd77 committed Dec 29, 2024
1 parent baddea8 commit c63931e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/document/html/parser/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ static struct element_info elements[] = {
{"ADDRESS", html_address, NULL, 2, ET_NESTABLE },
{"APPLET", html_applet, NULL, 1, ET_NON_PAIRABLE},
{"ARTICLE", html_article, NULL, 0, ET_NESTABLE },
{"ASIDE", html_linebrk, NULL, 1, ET_NESTABLE },
{"AUDIO", html_audio, NULL, 1, ET_NON_PAIRABLE},
{"B", html_bold, NULL, 0, ET_NESTABLE },
{"BASE", html_base, NULL, 0, ET_NON_PAIRABLE},
Expand All @@ -478,6 +479,8 @@ static struct element_info elements[] = {
{"DT", html_dt, NULL, 1, ET_NON_PAIRABLE},
{"EM", html_italic, NULL, 0, ET_NESTABLE },
{"EMBED", html_embed, NULL, 0, ET_NON_PAIRABLE},
{"FIGCAPTION", html_linebrk, NULL, 1, ET_NESTABLE },
{"FIGURE", html_linebrk, NULL, 1, ET_NESTABLE },
{"FIXED", html_fixed, NULL, 0, ET_NESTABLE },
{"FONT", html_font, NULL, 0, ET_NESTABLE },
{"FORM", html_form, NULL, 1, ET_NESTABLE },
Expand All @@ -499,7 +502,7 @@ static struct element_info elements[] = {
{"LI", html_li, NULL, 1, ET_LI },
{"LINK", html_link, NULL, 1, ET_NON_PAIRABLE},
{"LISTING", html_pre, NULL, 2, ET_NESTABLE },
{"MAIN", html_main, NULL, 0, ET_NON_NESTABLE},
{"MAIN", html_main, NULL, 1, ET_NON_NESTABLE},
{"MENU", html_ul, NULL, 2, ET_NESTABLE },
{"META", html_meta, NULL, 0, ET_NON_PAIRABLE},
{"NAV", html_linebrk, NULL, 1, ET_NESTABLE },
Expand All @@ -513,7 +516,7 @@ static struct element_info elements[] = {
{"Q", html_quote, html_quote_close, 0, ET_NESTABLE },
{"S", html_strike, NULL, 0, ET_NESTABLE },
{"SCRIPT", html_script, NULL, 0, ET_NESTABLE },
{"SECTION", html_section, NULL, 0, ET_NESTABLE },
{"SECTION", html_section, NULL, 1, ET_NESTABLE },
{"SELECT", html_select, NULL, 0, ET_NESTABLE },
{"SOURCE", html_source, NULL, 1, ET_NON_PAIRABLE},
{"SPAN", html_span, NULL, 0, ET_NESTABLE },
Expand Down
26 changes: 26 additions & 0 deletions test/aside.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<title>HTML5 Block-level Elements</title>

<header>
Header
</header>

<main>
Main
<aside>
Aside
</aside>
<section>
Section
<figure>
Figure
<figcaption>
Figcaption
</figcaption>
</figure>
</section>
</main>

<footer>
Footer
</footer>

0 comments on commit c63931e

Please sign in to comment.