fix: Fixed issue with rel_url not accepting JSON strings.

This commit is contained in:
Spencer Brower
2026-09-07 11:41:18 -04:00
parent 83e488965e
commit c570b29f9a
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -1,3 +1,4 @@
{{^params.stylesheets}}
<style> <style>
/* Nav */ /* Nav */
header nav ul { header nav ul {
@@ -228,4 +229,5 @@ label.margin-toggle:not(.sidenote-number) {
} }
} }
</style> </style>
{{/params.stylesheets}}
{{#params.stylesheets}}<link rel="stylesheet" href="{{.|rel_url}}">{{/params.stylesheets}} {{#params.stylesheets}}<link rel="stylesheet" href="{{.|rel_url}}">{{/params.stylesheets}}
+3 -1
View File
@@ -347,7 +347,8 @@ apply_filter :: proc(
span := filter.end_pos - filter.op_pos span := filter.end_pos - filter.op_pos
return take(value, filter.args[:], false, tmpl, filter.op_pos, span) return take(value, filter.args[:], false, tmpl, filter.op_pos, span)
case .Rel_Url: case .Rel_Url:
str, ok := reflect.as_string(value) bv, _ := base_value(value)
str, ok := reflect.as_string(bv)
if !ok { if !ok {
return value, Error_Body { return value, Error_Body {
msg = "rel_url may only be used on strings", msg = "rel_url may only be used on strings",
@@ -617,3 +618,4 @@ take :: proc(
return any{new_clone(str[start:end], context.temp_allocator), typeid_of(string)}, warning return any{new_clone(str[start:end], context.temp_allocator), typeid_of(string)}, warning
} }
} }