I've noticed that throughout most of the masterlists, there are quite a few lists that have only one element that aren't written in flow style. Here's an example from the SSE masterlist:
It's not a big deal, but it's definitely tidier that way. It's also done in most plugins nowadays, so it's worth doing for the sake of consistency.
@MacSplody did a lot of work towards this goal for the SSE masterlist in loot/skyrimse#978, the TES5 masterlist in loot/skyrim#311, & the TES4 masterlist in loot/oblivion#94 & loot/oblivion#72.
At the time of writing, I found 1 instance in the TES3 masterlist, 1 instance in the TES4 masterlist, 4 instances in the SSE masterlist, 18 instances in the TES5 masterlist, 73 instances in the FO4 masterlists, & about 493(!) instances in the FNV masterlist.
I found this out by searching the masterlists with a regex, specifically : *\n {3,}-.*\n {2,4}(?! ), to find most occurrences, taking advantage of the expected indentation of such an element & how it will be preceded by a colon & newline & followed by a less indented line. I also tried to factor in erroneous spaces & indentation (it still caught a few false positives from bad indentation). Any improvements to the regex are very welcome.
[x] TES3: 1 single-element list -> loot/morrowind@dd7a06c
[x] TES4: 1 single-element list -> loot/oblivion@dbd40f1
I further refined the regex, : *\n {3,}-[^\n|]*\n( {2,4}(?! )|\n+), to catch a few more instances it missed before, such as when a single-element list is followed by multiple newlines & either a new element or a non-indented line (e.g., a comment). The exclusion of the | character is to avoid 2 false positives in the TES5 masterlist. This caught 1 more instance in the FO3 & FNV masterlists, 2 in the TES3 masterlist, & 9 in the FO4 masterlist.
I've noticed that throughout most of the masterlists, there are quite a few lists that have only one element that aren't written in flow style. Here's an example from the SSE masterlist:
The
after
can be rewritten as:It's not a big deal, but it's definitely tidier that way. It's also done in most plugins nowadays, so it's worth doing for the sake of consistency.
@MacSplody did a lot of work towards this goal for the SSE masterlist in loot/skyrimse#978, the TES5 masterlist in loot/skyrim#311, & the TES4 masterlist in loot/oblivion#94 & loot/oblivion#72.
At the time of writing, I found 1 instance in the TES3 masterlist, 1 instance in the TES4 masterlist, 4 instances in the SSE masterlist, 18 instances in the TES5 masterlist, 73 instances in the FO4 masterlists, & about 493(!) instances in the FNV masterlist.
I found this out by searching the masterlists with a regex, specifically
: *\n {3,}-.*\n {2,4}(?! )
, to find most occurrences, taking advantage of the expected indentation of such an element & how it will be preceded by a colon & newline & followed by a less indented line. I also tried to factor in erroneous spaces & indentation (it still caught a few false positives from bad indentation). Any improvements to the regex are very welcome.I further refined the regex,
: *\n {3,}-[^\n|]*\n( {2,4}(?! )|\n+)
, to catch a few more instances it missed before, such as when a single-element list is followed by multiple newlines & either a new element or a non-indented line (e.g., a comment). The exclusion of the|
character is to avoid 2 false positives in the TES5 masterlist. This caught 1 more instance in the FO3 & FNV masterlists, 2 in the TES3 masterlist, & 9 in the FO4 masterlist.