Parsing changelogs like this would be a lot more forgiving to randomly placed whitespaces and also allow indenting with tabs.
Code: Select all
foreach line in file {
strg = trim(line).toLower();
if strg.StartsWith("version:") {
// version
} else if strg.StartsWith("date:") {
// date
} else if strg.EndsWith(":") {
// category
} else if strg.StartsWith("----") {
// separator
} else if strg.StartsWith("-") {
// add list item to last read category
}
}