Skip to content

Commit 1a1279f

Browse files
committed
docs(html_formatter): simplify tag lowercasing documentation
Simplify and improve documentation for tag lowercasing logic: - Remove redundant file source enumeration from HtmlFormatOptions - Streamline should_lowercase_html_tag documentation - Fix backtick formatting for consistency
1 parent 9f3d926 commit 1a1279f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

crates/biome_html_formatter/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::comments::{FormatHtmlComment, HtmlCommentStyle, HtmlComments};
1111

1212
#[derive(Debug, Clone)]
1313
pub struct HtmlFormatOptions {
14-
/// The file source (HTML, Svelte, Astro, or Vue).
14+
/// The file source.
1515
file_source: HtmlFileSource,
1616

1717
/// The indent style.

crates/biome_html_formatter/src/utils/metadata.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -726,11 +726,8 @@ pub(crate) fn is_canonical_html_tag(tag_name: &HtmlTagName) -> bool {
726726

727727
/// Whether a tag should be lowercased in the current formatting context.
728728
///
729-
/// Returns true only for canonical HTML tags in pure HTML files (.html).
730-
/// Component frameworks (Svelte, Astro, Vue) preserve tag name casing.
731-
///
732-
/// This combines file source checking with canonicality checking to provide
733-
/// a single decision point for tag lowercasing behavior.
729+
/// Returns `true` only for canonical HTML tags in pure HTML files (.html).
730+
/// Component frameworks preserve tag name casing.
734731
pub(crate) fn should_lowercase_html_tag(f: &HtmlFormatter, tag_name: &HtmlTagName) -> bool {
735732
f.options().file_source().is_html() && is_canonical_html_tag(tag_name)
736733
}

0 commit comments

Comments
 (0)