-
I'm writing a file converter, and for some fields I need to apply multiple casts. How can I do this? #[WithCast(HtmlToMarkdownCast::class), WithCast(HtmlTagsCleanerCast::class)]
public string $content, This wouldn't work. #[WithCast(HtmlToMarkdownCast::class)]
#[WithCast(HtmlTagsCleanerCast::class)]
public string $content, This also wouldn't work. What's the correct approach? |
Beta Was this translation helpful? Give feedback.
Answered by
tborealis
Dec 6, 2023
Replies: 1 comment 2 replies
-
I don't think the casts are designed to do this. How about passing a flag in to the HtmlToMarkdownCast that tells it to clean the HTML? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mynetx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think the casts are designed to do this. How about passing a flag in to the HtmlToMarkdownCast that tells it to clean the HTML?