mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
style: Ran odinfmt.
This commit is contained in:
+12
-13
@@ -48,10 +48,10 @@ parse_frontmatter :: proc(content: string) -> (fm: Frontmatter, body: string, ok
|
||||
return
|
||||
}
|
||||
|
||||
fm.title = json_get_string(obj, "title")
|
||||
fm.title = json_get_string(obj, "title")
|
||||
fm.description = json_get_string(obj, "description")
|
||||
fm.date = json_get_string(obj, "date")
|
||||
fm.lastmod = json_get_string(obj, "lastmod")
|
||||
fm.date = json_get_string(obj, "date")
|
||||
fm.lastmod = json_get_string(obj, "lastmod")
|
||||
fm.publishDate = json_get_string(obj, "publishDate")
|
||||
fm.draft = json_get_bool(obj, "draft")
|
||||
fm.isStarred = json_get_bool(obj, "isStarred")
|
||||
@@ -85,18 +85,17 @@ json_get_open_graph :: proc(obj: json.Object, key: string) -> Open_Graph {
|
||||
og: Open_Graph
|
||||
if v, ok := obj[key]; ok {
|
||||
if inner, ok2 := v.(json.Object); ok2 {
|
||||
og.title = json_get_string(inner, "title")
|
||||
og.type = json_get_string(inner, "type")
|
||||
og.image = json_get_string(inner, "image")
|
||||
og.url = json_get_string(inner, "url")
|
||||
og.description = json_get_string(inner, "description")
|
||||
og.locale = json_get_string(inner, "locale")
|
||||
og.site_name = json_get_string(inner, "site_name")
|
||||
og.title = json_get_string(inner, "title")
|
||||
og.type = json_get_string(inner, "type")
|
||||
og.image = json_get_string(inner, "image")
|
||||
og.url = json_get_string(inner, "url")
|
||||
og.description = json_get_string(inner, "description")
|
||||
og.locale = json_get_string(inner, "locale")
|
||||
og.site_name = json_get_string(inner, "site_name")
|
||||
og.published_time = json_get_string(inner, "published_time")
|
||||
og.modified_time = json_get_string(inner, "modified_time")
|
||||
og.section = json_get_string(inner, "section")
|
||||
og.modified_time = json_get_string(inner, "modified_time")
|
||||
og.section = json_get_string(inner, "section")
|
||||
}
|
||||
}
|
||||
return og
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user