Skip to content
Open
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
58 changes: 56 additions & 2 deletions 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.

70 changes: 66 additions & 4 deletions 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.

101 changes: 101 additions & 0 deletions crates/biome_markdown_formatter/src/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,44 @@ impl IntoFormat<MarkdownFormatContext> for biome_markdown_syntax::MdIndentCodeBl
)
}
}
impl FormatRule<biome_markdown_syntax::MdIndentToken>
for crate::markdown::auxiliary::indent_token::FormatMdIndentToken
{
type Context = MarkdownFormatContext;
#[inline(always)]
fn fmt(
&self,
node: &biome_markdown_syntax::MdIndentToken,
f: &mut MarkdownFormatter,
) -> FormatResult<()> {
FormatNodeRule::<biome_markdown_syntax::MdIndentToken>::fmt(self, node, f)
}
}
impl AsFormat<MarkdownFormatContext> for biome_markdown_syntax::MdIndentToken {
type Format<'a> = FormatRefWithRule<
'a,
biome_markdown_syntax::MdIndentToken,
crate::markdown::auxiliary::indent_token::FormatMdIndentToken,
>;
fn format(&self) -> Self::Format<'_> {
FormatRefWithRule::new(
self,
crate::markdown::auxiliary::indent_token::FormatMdIndentToken::default(),
)
}
}
impl IntoFormat<MarkdownFormatContext> for biome_markdown_syntax::MdIndentToken {
type Format = FormatOwnedWithRule<
biome_markdown_syntax::MdIndentToken,
crate::markdown::auxiliary::indent_token::FormatMdIndentToken,
>;
fn into_format(self) -> Self::Format {
FormatOwnedWithRule::new(
self,
crate::markdown::auxiliary::indent_token::FormatMdIndentToken::default(),
)
}
}
impl FormatRule<biome_markdown_syntax::MdInlineCode>
for crate::markdown::auxiliary::inline_code::FormatMdInlineCode
{
Expand Down Expand Up @@ -873,6 +911,44 @@ impl IntoFormat<MarkdownFormatContext> for biome_markdown_syntax::MdLinkTitle {
)
}
}
impl FormatRule<biome_markdown_syntax::MdListMarkerPrefix>
for crate::markdown::auxiliary::list_marker_prefix::FormatMdListMarkerPrefix
{
type Context = MarkdownFormatContext;
#[inline(always)]
fn fmt(
&self,
node: &biome_markdown_syntax::MdListMarkerPrefix,
f: &mut MarkdownFormatter,
) -> FormatResult<()> {
FormatNodeRule::<biome_markdown_syntax::MdListMarkerPrefix>::fmt(self, node, f)
}
}
impl AsFormat<MarkdownFormatContext> for biome_markdown_syntax::MdListMarkerPrefix {
type Format<'a> = FormatRefWithRule<
'a,
biome_markdown_syntax::MdListMarkerPrefix,
crate::markdown::auxiliary::list_marker_prefix::FormatMdListMarkerPrefix,
>;
fn format(&self) -> Self::Format<'_> {
FormatRefWithRule::new(
self,
crate::markdown::auxiliary::list_marker_prefix::FormatMdListMarkerPrefix::default(),
)
}
}
impl IntoFormat<MarkdownFormatContext> for biome_markdown_syntax::MdListMarkerPrefix {
type Format = FormatOwnedWithRule<
biome_markdown_syntax::MdListMarkerPrefix,
crate::markdown::auxiliary::list_marker_prefix::FormatMdListMarkerPrefix,
>;
fn into_format(self) -> Self::Format {
FormatOwnedWithRule::new(
self,
crate::markdown::auxiliary::list_marker_prefix::FormatMdListMarkerPrefix::default(),
)
}
}
impl FormatRule<biome_markdown_syntax::MdNewline>
for crate::markdown::auxiliary::newline::FormatMdNewline
{
Expand Down Expand Up @@ -1467,6 +1543,31 @@ impl IntoFormat<MarkdownFormatContext> for biome_markdown_syntax::MdHashList {
)
}
}
impl AsFormat<MarkdownFormatContext> for biome_markdown_syntax::MdIndentTokenList {
type Format<'a> = FormatRefWithRule<
'a,
biome_markdown_syntax::MdIndentTokenList,
crate::markdown::lists::indent_token_list::FormatMdIndentTokenList,
>;
fn format(&self) -> Self::Format<'_> {
FormatRefWithRule::new(
self,
crate::markdown::lists::indent_token_list::FormatMdIndentTokenList::default(),
)
}
}
impl IntoFormat<MarkdownFormatContext> for biome_markdown_syntax::MdIndentTokenList {
type Format = FormatOwnedWithRule<
biome_markdown_syntax::MdIndentTokenList,
crate::markdown::lists::indent_token_list::FormatMdIndentTokenList,
>;
fn into_format(self) -> Self::Format {
FormatOwnedWithRule::new(
self,
crate::markdown::lists::indent_token_list::FormatMdIndentTokenList::default(),
)
}
}
impl AsFormat<MarkdownFormatContext> for biome_markdown_syntax::MdInlineItemList {
type Format<'a> = FormatRefWithRule<
'a,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::prelude::*;
use biome_markdown_syntax::MdIndentToken;
use biome_rowan::AstNode;
#[derive(Debug, Clone, Default)]
pub(crate) struct FormatMdIndentToken;
impl FormatNodeRule<MdIndentToken> for FormatMdIndentToken {
fn fmt_fields(&self, node: &MdIndentToken, f: &mut MarkdownFormatter) -> FormatResult<()> {
format_verbatim_node(node.syntax()).fmt(f)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::prelude::*;
use biome_markdown_syntax::MdListMarkerPrefix;
use biome_rowan::AstNode;
#[derive(Debug, Clone, Default)]
pub(crate) struct FormatMdListMarkerPrefix;
impl FormatNodeRule<MdListMarkerPrefix> for FormatMdListMarkerPrefix {
fn fmt_fields(&self, node: &MdListMarkerPrefix, f: &mut MarkdownFormatter) -> FormatResult<()> {
format_verbatim_node(node.syntax()).fmt(f)
}
}
2 changes: 2 additions & 0 deletions crates/biome_markdown_formatter/src/markdown/auxiliary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub(crate) mod header;
pub(crate) mod html_block;
pub(crate) mod indent;
pub(crate) mod indent_code_block;
pub(crate) mod indent_token;
pub(crate) mod inline_code;
pub(crate) mod inline_emphasis;
pub(crate) mod inline_html;
Expand All @@ -23,6 +24,7 @@ pub(crate) mod link_destination;
pub(crate) mod link_label;
pub(crate) mod link_reference_definition;
pub(crate) mod link_title;
pub(crate) mod list_marker_prefix;
pub(crate) mod newline;
pub(crate) mod ordered_list_item;
pub(crate) mod paragraph;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::prelude::*;
use biome_markdown_syntax::MdIndentTokenList;
#[derive(Debug, Clone, Default)]
pub(crate) struct FormatMdIndentTokenList;
impl FormatRule<MdIndentTokenList> for FormatMdIndentTokenList {
type Context = MarkdownFormatContext;
fn fmt(&self, node: &MdIndentTokenList, f: &mut MarkdownFormatter) -> FormatResult<()> {
f.join().entries(node.iter().formatted()).finish()
}
}
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 @@ -4,5 +4,6 @@ pub(crate) mod block_list;
pub(crate) mod bullet_list;
pub(crate) mod code_name_list;
pub(crate) mod hash_list;
pub(crate) mod indent_token_list;
pub(crate) mod inline_item_list;
pub(crate) mod quote_indent_list;
Loading
Loading