diff --git a/src/markdown/convert.rs b/src/markdown/convert.rs index 9604629..7e17d19 100644 --- a/src/markdown/convert.rs +++ b/src/markdown/convert.rs @@ -446,16 +446,10 @@ pub(super) fn to_markdown_from_lines_with_tables_and_images( detect_header_level(line_font_size, base_size, &heading_tiers).or_else(|| { // Bold-only lines at body font size that are standalone (paragraph break // before them) are likely section headings. Require ≥3 words to avoid - // promoting short labels/field names. Exclude lines ending with colon - // (labels like "Table I:") or that are too short. + // promoting short labels/field names. let all_bold = !line.items.is_empty() && line.items.iter().all(|i| i.is_bold); let word_count = plain_trimmed.split_whitespace().count(); - // Reject lines ending with colon (labels like "Table:") — - // strip trailing non-colon punctuation first (e.g. ":*" → ":") - let stripped = - plain_trimmed.trim_end_matches(|c: char| c != ':' && !c.is_alphanumeric()); - let ends_with_colon = stripped.ends_with(':'); - if all_bold && !in_paragraph && word_count >= 3 && !ends_with_colon { + if all_bold && !in_paragraph && word_count >= 3 { Some(bold_heading_level(&heading_tiers)) } else { None diff --git a/tests/snapshots/p1244-1996.md b/tests/snapshots/p1244-1996.md index 9d3dfd6..1cc6e3c 100644 --- a/tests/snapshots/p1244-1996.md +++ b/tests/snapshots/p1244-1996.md @@ -8,7 +8,11 @@ Department of the Treasury **Internal Revenue Service** # and Report to Employer -**This publication contains:** **Form 4070A, Employee’s Daily Record of** Tips **Form 4070, Employee’s Report of Tips to** Employer +### This publication contains: + +### Form 4070A, Employee’s Daily Record of + +Tips **Form 4070, Employee’s Report of Tips to** Employer For the period diff --git a/tests/snapshots/real-estate-pricing.md b/tests/snapshots/real-estate-pricing.md index b19471f..028f099 100644 --- a/tests/snapshots/real-estate-pricing.md +++ b/tests/snapshots/real-estate-pricing.md @@ -8,7 +8,9 @@ **Table I: Cap rate correlations** -**Cap Rate Correlation With:*** **BBB Corp** **10-Year Bond Yield S&P Dividend** **Treasury (10-15 yr) Yield** Multifamily 0.187 0.771 0.068 Industrial-0.221 0.748-0.307 CBD Office-0.449 0.694-0.458 Retail-0.181 0.649-02.58 +## Cap Rate Correlation With:* + +**BBB Corp** **10-Year Bond Yield S&P Dividend** **Treasury (10-15 yr) Yield** Multifamily 0.187 0.771 0.068 Industrial-0.221 0.748-0.307 CBD Office-0.449 0.694-0.458 Retail-0.181 0.649-02.58 * Based on 25 years of data for the 10-yrT & S&P DivYld; and 14 years for BBB. **Figure 1:** NCREIF cap rates vs. 10-yearTreasury