Compare commits

..
4 Commits
Author SHA1 Message Date
Bendik Aagaard LynghaugandClaude Fable 5 b25a5839b0 Release 0.3.31
Test / test (push) Successful in 27s
Publish release / publish (push) Successful in 1m45s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y42TyF8Zu7NGRR2893vNcZ
2026-09-01 21:48:25 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 c4609f4370 Markdown links allow tel:
Phone numbers can now be [+47 …](tel:+47…) links in descriptions,
same gate as https/mailto/relative.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y42TyF8Zu7NGRR2893vNcZ
2026-09-01 21:48:25 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 2c94ba4379 Release 0.3.30
Test / test (push) Successful in 28s
Publish release / publish (push) Successful in 1m50s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y42TyF8Zu7NGRR2893vNcZ
2026-09-01 21:42:20 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 065bd0a86a Single alt-image shows natural height
Was cropped to a 14rem band via object-fit: cover; now shows the whole
image at natural aspect, bounded at 32rem so a tall one can't tower.
The image deck keeps its fixed-height cards.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y42TyF8Zu7NGRR2893vNcZ
2026-09-01 21:42:20 +02:00
4 changed files with 13 additions and 4 deletions
Generated
+1 -1
View File
@@ -2948,7 +2948,7 @@ dependencies = [
[[package]] [[package]]
name = "portal" name = "portal"
version = "0.3.28" version = "0.3.30"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arc-swap", "arc-swap",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "portal" name = "portal"
version = "0.3.29" version = "0.3.31"
edition = "2021" edition = "2021"
[lib] [lib]
+5
View File
@@ -191,6 +191,7 @@ pub fn render_inline_markdown(text: &str) -> String {
Event::Start(Tag::Link { dest_url, .. }) Event::Start(Tag::Link { dest_url, .. })
if !(dest_url.starts_with("https://") if !(dest_url.starts_with("https://")
|| dest_url.starts_with("mailto:") || dest_url.starts_with("mailto:")
|| dest_url.starts_with("tel:")
|| dest_url.starts_with('/')) => || dest_url.starts_with('/')) =>
{ {
in_link += 1; in_link += 1;
@@ -2146,6 +2147,10 @@ alternatives:
fn markdown_drops_html_and_unsafe_links() { fn markdown_drops_html_and_unsafe_links() {
assert_eq!(render_inline_markdown("x <script>y</script> z"), "x y z"); assert_eq!(render_inline_markdown("x <script>y</script> z"), "x y z");
assert_eq!(render_inline_markdown("[bad](javascript:alert(1))"), "bad"); assert_eq!(render_inline_markdown("[bad](javascript:alert(1))"), "bad");
assert_eq!(
render_inline_markdown("[ring](tel:+4791180485)"),
"<a href=\"tel:+4791180485\">ring</a>"
);
assert_eq!( assert_eq!(
render_inline_markdown("![site](https://x.no/a.jpg)"), render_inline_markdown("![site](https://x.no/a.jpg)"),
"<img src=\"https://x.no/a.jpg\" alt=\"site\" />" "<img src=\"https://x.no/a.jpg\" alt=\"site\" />"
+6 -2
View File
@@ -368,8 +368,12 @@ main.not-found {
.alt-image { .alt-image {
display: block; display: block;
width: 100%; width: 100%;
max-height: 14rem; height: auto;
object-fit: cover; /* Natural aspect, not a cropped band; a very tall image is still
bounded so it can't tower. The deck below overrides for its
fixed-height cards. */
max-height: 32rem;
object-fit: contain;
border-radius: calc(var(--radius) - 0.3rem); border-radius: calc(var(--radius) - 0.3rem);
margin-bottom: 1.1rem; margin-bottom: 1.1rem;
} }