Skip to content

Commit

Permalink
fix(html): split out prose after specification
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Nov 6, 2024
1 parent 3c7b3cc commit a0af5e8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/rari-doc/src/html/sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub fn split_sections(html: &Html) -> Result<Splitted, DocError> {
section.query = Some(query.into());
} else {
// We have already something in body.
// Yari does something weird so we do that to:
// Yari does something weird so we do that too:
// We push compat section and put prose after that 🤷.

let heading = section.heading.take();
Expand Down Expand Up @@ -178,7 +178,7 @@ pub fn split_sections(html: &Html) -> Result<Splitted, DocError> {
section.spec_urls = urls.map(String::from);
} else {
// We have already something in body.
// Yari does something weird so we do that to:
// Yari does something weird so we do that too:
// We push compat section and put prose after that 🤷.

let heading = section.heading.take();
Expand All @@ -203,7 +203,11 @@ pub fn split_sections(html: &Html) -> Result<Splitted, DocError> {
let html = ElementRef::wrap(current).unwrap().html();
if let Some(ref mut section) =
maybe_section.as_mut().and_then(|section| {
if !matches!(section.typ, BuildSectionType::Compat) {
if !matches!(
section.typ,
BuildSectionType::Compat
| BuildSectionType::Specification
) {
Some(section)
} else {
None
Expand Down

0 comments on commit a0af5e8

Please sign in to comment.