Skip to content

Commit

Permalink
feat(html): support collapsed attribute in blockquote tag
Browse files Browse the repository at this point in the history
- Added logic to check for the 'collapsed' attribute in blockquote tags.
- Updated MessageEntityBlockquote to use the collapsed attribute value.
  • Loading branch information
AndrielFR committed Jan 26, 2025
1 parent b2ebb36 commit 9690088
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/grammers-client/src/parsers/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ pub fn parse_html_message(message: &str) -> (String, Vec<tl::enums::MessageEntit
entities.push(tl::types::MessageEntityUnderline { offset, length }.into());
}
tag!("blockquote") => {
let collapsed = attrs.into_iter().any(|a| &a.name.local == "collapsed");

entities.push(
tl::types::MessageEntityBlockquote {
offset,
length,
collapsed: false,
collapsed,
}
.into(),
);
Expand Down

0 comments on commit 9690088

Please sign in to comment.