mirror of
https://github.com/sbrow/thor.git
synced 2026-10-25 10:11:55 -04:00
fix: Fixed issue with rel_url not accepting JSON strings.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{{^params.stylesheets}}
|
||||
<style>
|
||||
/* Nav */
|
||||
header nav ul {
|
||||
@@ -228,4 +229,5 @@ label.margin-toggle:not(.sidenote-number) {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{{/params.stylesheets}}
|
||||
{{#params.stylesheets}}<link rel="stylesheet" href="{{.|rel_url}}">{{/params.stylesheets}}
|
||||
|
||||
+3
-1
@@ -347,7 +347,8 @@ apply_filter :: proc(
|
||||
span := filter.end_pos - filter.op_pos
|
||||
return take(value, filter.args[:], false, tmpl, filter.op_pos, span)
|
||||
case .Rel_Url:
|
||||
str, ok := reflect.as_string(value)
|
||||
bv, _ := base_value(value)
|
||||
str, ok := reflect.as_string(bv)
|
||||
if !ok {
|
||||
return value, Error_Body {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user