From aadd4187a0331bd3e3bfb42dfb150faf06b34e1a Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sun, 12 Nov 2017 13:48:21 +0100 Subject: [PATCH] Improved character data --- jobs/sync-characters/sync-characters.go | 6 +++++- pages/character/character.pixy | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/jobs/sync-characters/sync-characters.go b/jobs/sync-characters/sync-characters.go index 9db0da07..a7043f8a 100644 --- a/jobs/sync-characters/sync-characters.go +++ b/jobs/sync-characters/sync-characters.go @@ -50,7 +50,7 @@ func main() { colonPos := strings.Index(line, ":") - if colonPos == -1 || colonPos > 25 { + if colonPos == -1 || colonPos < 2 || colonPos > 25 { finalLines = append(finalLines, originalLine) continue } @@ -60,6 +60,10 @@ func main() { value = strings.TrimSpace(value) + if key == "source" { + key = "Source" + } + character.Attributes = append(character.Attributes, &arn.CharacterAttribute{ Name: key, Value: value, diff --git a/pages/character/character.pixy b/pages/character/character.pixy index b2395215..2ea53205 100644 --- a/pages/character/character.pixy +++ b/pages/character/character.pixy @@ -16,5 +16,9 @@ component CharacterDetails(character *arn.Character) each attribute in character.Attributes tr.mountable(data-mountable-type="info") td.character-attributes-name= attribute.Name + ":" - td.character-attributes-value= attribute.Value + + if strings.Contains(attribute.Value, "<") + td.character-attributes-value!= markdown.Render(attribute.Value) + else + td.character-attributes-value= attribute.Value