1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-24 17:29:23 +01:00

fixed UnderlineCode being a font code, making it end in the wrong places

This commit is contained in:
Ell 2021-05-24 17:12:02 +02:00
parent ef45c324f9
commit 3da97fcc83
2 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ namespace MLEM.Formatting.Codes {
/// <inheritdoc />
public override bool EndsHere(Code other) {
return base.EndsHere(other) || other is ResetFormattingCode;
return other is ShadowCode || other is ResetFormattingCode;
}
}

View file

@ -7,13 +7,13 @@ using MLEM.Misc;
namespace MLEM.Formatting.Codes {
/// <inheritdoc />
public class UnderlineCode : FontCode {
public class UnderlineCode : Code {
private readonly float thickness;
private readonly float yOffset;
/// <inheritdoc />
public UnderlineCode(Match match, Regex regex, float thickness, float yOffset) : base(match, regex, null) {
public UnderlineCode(Match match, Regex regex, float thickness, float yOffset) : base(match, regex) {
this.thickness = thickness;
this.yOffset = yOffset;
}
@ -31,7 +31,7 @@ namespace MLEM.Formatting.Codes {
/// <inheritdoc />
public override bool EndsHere(Code other) {
return base.EndsHere(other) || other is ResetFormattingCode;
return other is UnderlineCode || other is ResetFormattingCode;
}
}