Improved character data

This commit is contained in:
Eduard Urbach 2017-11-12 13:48:21 +01:00
parent b2c188d337
commit aadd4187a0
2 changed files with 10 additions and 2 deletions

View File

@ -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,

View File

@ -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