break command definition on new @vt entry

This commit is contained in:
Jörg Breitbart
2020-01-07 01:01:46 +01:00
parent dae8c3599b
commit e240160d39
2 changed files with 13 additions and 10 deletions
+13 -3
View File
@@ -252,11 +252,21 @@ function* parseMultiLineGen(filename, s) {
grabLine = false;
longDescription = [];
feature = undefined;
continue;
}
longDescription.push(line);
else if (line.indexOf('@vt:') === 0) {
if (feature) {
feature.longDescription = [];
feature.longTarget = createAnchorSlug(feature.name);
yield feature;
}
grabLine = true;
longDescription = [];
feature = undefined;
} else {
longDescription.push(line);
}
}
if (~line.indexOf('@vt:')) {
if (line.indexOf('@vt:') === 0) {
feature = parseSingleLine(filename, line);
grabLine = true;
}