Added spoilers to characters

This commit is contained in:
2018-11-01 09:11:11 +09:00
parent 007e2e90ec
commit 2730306cef
4 changed files with 25 additions and 0 deletions

View File

@ -83,6 +83,15 @@ func parseCharacterDescription(input string) (output string, attributes []*arn.C
continue
}
paragraph = strings.TrimSpace(paragraph)
// Skip paragraph if it's too short.
if len(paragraph) < 30 {
if !strings.HasSuffix(paragraph, ".") || strings.HasSuffix(paragraph, "...") {
continue
}
}
finalParagraphs = append(finalParagraphs, paragraph)
// originalLine := line