mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +01:00
fixed UnderlineCode being a font code, making it end in the wrong places
This commit is contained in:
parent
ef45c324f9
commit
3da97fcc83
2 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ namespace MLEM.Formatting.Codes {
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool EndsHere(Code other) {
|
public override bool EndsHere(Code other) {
|
||||||
return base.EndsHere(other) || other is ResetFormattingCode;
|
return other is ShadowCode || other is ResetFormattingCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,13 @@ using MLEM.Misc;
|
||||||
|
|
||||||
namespace MLEM.Formatting.Codes {
|
namespace MLEM.Formatting.Codes {
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public class UnderlineCode : FontCode {
|
public class UnderlineCode : Code {
|
||||||
|
|
||||||
private readonly float thickness;
|
private readonly float thickness;
|
||||||
private readonly float yOffset;
|
private readonly float yOffset;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <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.thickness = thickness;
|
||||||
this.yOffset = yOffset;
|
this.yOffset = yOffset;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ namespace MLEM.Formatting.Codes {
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool EndsHere(Code other) {
|
public override bool EndsHere(Code other) {
|
||||||
return base.EndsHere(other) || other is ResetFormattingCode;
|
return other is UnderlineCode || other is ResetFormattingCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue