Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dbfd090
Apply feedback from previous PR
RemcoSmitsDev Aug 31, 2025
d98cd19
Add support for inline images
RemcoSmitsDev Aug 31, 2025
cfa6896
Remove styling preparation code
RemcoSmitsDev Aug 31, 2025
a4c8e7e
Fix rare panic
RemcoSmitsDev Aug 31, 2025
e476d14
Fix wrapping with inline images
RemcoSmitsDev Sep 1, 2025
5dfd0e7
Add more styling elements support
RemcoSmitsDev Aug 31, 2025
2f7138d
Fix incorrect highlight range + Add test
RemcoSmitsDev Aug 31, 2025
f7c0ede
Rename test
RemcoSmitsDev Aug 31, 2025
5e46085
Add test to make sure we don't insert empty paragraph for newlines
RemcoSmitsDev Aug 31, 2025
6a0d366
Don't create new vec for adding highlight range
RemcoSmitsDev Aug 31, 2025
c3860f3
Minify markdown to remove newlines & specify capacity for links
RemcoSmitsDev Sep 3, 2025
730b1cb
Merge branch 'main' into markdown-support-inline-elements
RemcoSmitsDev Sep 3, 2025
d27656d
Revert "Minify markdown to remove newlines & specify capacity for links"
RemcoSmitsDev Sep 3, 2025
6ec0601
Allow specifying styles inside `style` attribute
RemcoSmitsDev Sep 3, 2025
85cc43d
Remove default case
RemcoSmitsDev Sep 3, 2025
48578d4
Only add styles if they are not the default
RemcoSmitsDev Sep 4, 2025
8b8186a
Undo flex wrap logic
RemcoSmitsDev Sep 4, 2025
6a86194
Merge branch 'markdown-support-inline-elements' into markdown-styling…
RemcoSmitsDev Sep 4, 2025
3163088
Revert "Undo flex wrap logic"
RemcoSmitsDev Sep 4, 2025
ac33ede
Merge branch 'markdown-support-inline-elements' into markdown-styling…
RemcoSmitsDev Sep 4, 2025
3760896
Merge branch 'main' into markdown-styling-support
RemcoSmitsDev Sep 8, 2025
9d83b9b
Fix clippy
RemcoSmitsDev Sep 8, 2025
b38470c
Make it more clear what to use `elements` vs `paragraph` inside
RemcoSmitsDev Sep 8, 2025
1df06b7
Rename `emphasized` to `oblique`
RemcoSmitsDev Sep 8, 2025
6deb684
Add test for style attribute usage
RemcoSmitsDev Sep 8, 2025
3a2c6b0
Merge branch 'main' into markdown-styling-support
RemcoSmitsDev Sep 20, 2025
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
6 changes: 6 additions & 0 deletions crates/markdown_preview/src/markdown_elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ impl MarkdownHighlight {
highlight.font_style = Some(FontStyle::Italic);
}

if style.oblique {
highlight.font_style = Some(FontStyle::Oblique)
}

if style.underline {
highlight.underline = Some(UnderlineStyle {
thickness: px(1.),
Expand Down Expand Up @@ -221,6 +225,8 @@ pub struct MarkdownHighlightStyle {
pub strikethrough: bool,
/// The weight of the text.
pub weight: FontWeight,
/// Whether the text should be obliqued.
pub oblique: bool,
}

/// A parsed region in a Markdown document.
Expand Down
Loading