mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 19:27:24 +08:00
Only trim trailing spaces to avoid breakage in storyboard parsing
This commit is contained in:
parent
bb3c3f302a
commit
5b0d75ee56
@ -67,16 +67,14 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected override void ParseLine(Beatmap beatmap, Section section, string line)
|
protected override void ParseLine(Beatmap beatmap, Section section, string line)
|
||||||
{
|
{
|
||||||
var strippedLine = StripComments(line);
|
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.General:
|
case Section.General:
|
||||||
handleGeneral(strippedLine);
|
handleGeneral(line);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Editor:
|
case Section.Editor:
|
||||||
handleEditor(strippedLine);
|
handleEditor(line);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Metadata:
|
case Section.Metadata:
|
||||||
@ -84,19 +82,19 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Difficulty:
|
case Section.Difficulty:
|
||||||
handleDifficulty(strippedLine);
|
handleDifficulty(line);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Events:
|
case Section.Events:
|
||||||
handleEvent(strippedLine);
|
handleEvent(line);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.TimingPoints:
|
case Section.TimingPoints:
|
||||||
handleTimingPoint(strippedLine);
|
handleTimingPoint(line);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.HitObjects:
|
case Section.HitObjects:
|
||||||
handleHitObject(strippedLine);
|
handleHitObject(line);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
if (ShouldSkipLine(line))
|
if (ShouldSkipLine(line))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
line = line.Trim();
|
line = StripComments(line).TrimEnd();
|
||||||
|
|
||||||
if (line.StartsWith('[') && line.EndsWith(']'))
|
if (line.StartsWith('[') && line.EndsWith(']'))
|
||||||
{
|
{
|
||||||
@ -73,8 +73,6 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected virtual void ParseLine(T output, Section section, string line)
|
protected virtual void ParseLine(T output, Section section, string line)
|
||||||
{
|
{
|
||||||
line = StripComments(line);
|
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.Colours:
|
case Section.Colours:
|
||||||
|
@ -45,8 +45,6 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected override void ParseLine(Storyboard storyboard, Section section, string line)
|
protected override void ParseLine(Storyboard storyboard, Section section, string line)
|
||||||
{
|
{
|
||||||
line = StripComments(line);
|
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.General:
|
case Section.General:
|
||||||
|
@ -31,8 +31,6 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
protected override void ParseLine(List<LegacyManiaSkinConfiguration> output, Section section, string line)
|
protected override void ParseLine(List<LegacyManiaSkinConfiguration> output, Section section, string line)
|
||||||
{
|
{
|
||||||
line = StripComments(line);
|
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.Mania:
|
case Section.Mania:
|
||||||
|
Loading…
Reference in New Issue
Block a user