Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion crates/biome_markdown_factory/src/generated/node_factory.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion crates/biome_markdown_factory/src/generated/syntax_factory.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 88 additions & 0 deletions crates/biome_markdown_formatter/src/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,94 @@ impl IntoFormat<MdFormatContext> for biome_markdown_syntax::MdThematicBreakBlock
)
}
}
impl FormatRule<biome_markdown_syntax::MdThematicBreakChar>
for crate::markdown::auxiliary::thematic_break_char::FormatMdThematicBreakChar
{
type Context = MdFormatContext;
#[inline(always)]
fn fmt(
&self,
node: &biome_markdown_syntax::MdThematicBreakChar,
f: &mut MarkdownFormatter,
) -> FormatResult<()> {
FormatNodeRule::<biome_markdown_syntax::MdThematicBreakChar>::fmt(self, node, f)
}
}
impl AsFormat<MdFormatContext> for biome_markdown_syntax::MdThematicBreakChar {
type Format<'a> = FormatRefWithRule<
'a,
biome_markdown_syntax::MdThematicBreakChar,
crate::markdown::auxiliary::thematic_break_char::FormatMdThematicBreakChar,
>;
fn format(&self) -> Self::Format<'_> {
FormatRefWithRule::new(
self,
crate::markdown::auxiliary::thematic_break_char::FormatMdThematicBreakChar::default(),
)
}
}
impl IntoFormat<MdFormatContext> for biome_markdown_syntax::MdThematicBreakChar {
type Format = FormatOwnedWithRule<
biome_markdown_syntax::MdThematicBreakChar,
crate::markdown::auxiliary::thematic_break_char::FormatMdThematicBreakChar,
>;
fn into_format(self) -> Self::Format {
FormatOwnedWithRule::new(
self,
crate::markdown::auxiliary::thematic_break_char::FormatMdThematicBreakChar::default(),
)
}
}
impl AsFormat<MdFormatContext> for biome_markdown_syntax::MdThematicBreakPartList {
type Format<'a> = FormatRefWithRule<
'a,
biome_markdown_syntax::MdThematicBreakPartList,
crate::markdown::lists::thematic_break_part_list::FormatMdThematicBreakPartList,
>;
fn format(&self) -> Self::Format<'_> {
FormatRefWithRule::new(
self,
crate::markdown::lists::thematic_break_part_list::FormatMdThematicBreakPartList::default(),
)
}
}
impl IntoFormat<MdFormatContext> for biome_markdown_syntax::MdThematicBreakPartList {
type Format = FormatOwnedWithRule<
biome_markdown_syntax::MdThematicBreakPartList,
crate::markdown::lists::thematic_break_part_list::FormatMdThematicBreakPartList,
>;
fn into_format(self) -> Self::Format {
FormatOwnedWithRule::new(
self,
crate::markdown::lists::thematic_break_part_list::FormatMdThematicBreakPartList::default(),
)
}
}
impl AsFormat<MdFormatContext> for biome_markdown_syntax::AnyMdThematicBreakPart {
type Format<'a> = FormatRefWithRule<
'a,
biome_markdown_syntax::AnyMdThematicBreakPart,
crate::markdown::any::thematic_break_part::FormatAnyMdThematicBreakPart,
>;
fn format(&self) -> Self::Format<'_> {
FormatRefWithRule::new(
self,
crate::markdown::any::thematic_break_part::FormatAnyMdThematicBreakPart::default(),
)
}
}
impl IntoFormat<MdFormatContext> for biome_markdown_syntax::AnyMdThematicBreakPart {
type Format = FormatOwnedWithRule<
biome_markdown_syntax::AnyMdThematicBreakPart,
crate::markdown::any::thematic_break_part::FormatAnyMdThematicBreakPart,
>;
fn into_format(self) -> Self::Format {
FormatOwnedWithRule::new(
self,
crate::markdown::any::thematic_break_part::FormatAnyMdThematicBreakPart::default(),
)
}
}
impl AsFormat<MdFormatContext> for biome_markdown_syntax::MdBlockList {
type Format<'a> = FormatRefWithRule<
'a,
Expand Down
1 change: 1 addition & 0 deletions crates/biome_markdown_formatter/src/markdown/any/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pub(crate) mod code_block;
pub(crate) mod container_block;
pub(crate) mod inline;
pub(crate) mod leaf_block;
pub(crate) mod thematic_break_part;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use crate::prelude::*;
use biome_markdown_syntax::AnyMdThematicBreakPart;
#[derive(Debug, Clone, Default)]
pub(crate) struct FormatAnyMdThematicBreakPart;
impl FormatRule<AnyMdThematicBreakPart> for FormatAnyMdThematicBreakPart {
type Context = MdFormatContext;
fn fmt(&self, node: &AnyMdThematicBreakPart, f: &mut MarkdownFormatter) -> FormatResult<()> {
match node {
AnyMdThematicBreakPart::MdIndentToken(node) => node.format().fmt(f),
AnyMdThematicBreakPart::MdThematicBreakChar(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ pub(crate) mod setext_header;
pub(crate) mod soft_break;
pub(crate) mod textual;
pub(crate) mod thematic_break_block;
pub(crate) mod thematic_break_char;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use crate::prelude::*;
use biome_markdown_syntax::MdThematicBreakChar;
use biome_rowan::AstNode;
#[derive(Debug, Clone, Default)]
pub(crate) struct FormatMdThematicBreakChar;
impl FormatNodeRule<MdThematicBreakChar> for FormatMdThematicBreakChar {
fn fmt_fields(
&self,
node: &MdThematicBreakChar,
f: &mut MarkdownFormatter,
) -> FormatResult<()> {
format_verbatim_node(node.syntax()).fmt(f)
}
}
1 change: 1 addition & 0 deletions crates/biome_markdown_formatter/src/markdown/lists/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pub(crate) mod hash_list;
pub(crate) mod indent_token_list;
pub(crate) mod inline_item_list;
pub(crate) mod quote_indent_list;
pub(crate) mod thematic_break_part_list;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::prelude::*;
use biome_markdown_syntax::MdThematicBreakPartList;
#[derive(Debug, Clone, Default)]
pub(crate) struct FormatMdThematicBreakPartList;
impl FormatRule<MdThematicBreakPartList> for FormatMdThematicBreakPartList {
type Context = MdFormatContext;
fn fmt(&self, node: &MdThematicBreakPartList, f: &mut MarkdownFormatter) -> FormatResult<()> {
f.join().entries(node.iter().formatted()).finish()
}
}
Loading
Loading