1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 14:38:34 +01:00

modify link regex to allow for no destination to be specified

This commit is contained in:
Ellpeck 2020-05-20 01:02:18 +02:00
parent af1918d545
commit 979dce510e

View file

@ -103,7 +103,7 @@ namespace MLEM.Ui {
}; };
this.TextFormatter = new TextFormatter(); this.TextFormatter = new TextFormatter();
this.TextFormatter.Codes.Add(new Regex("<l ([^>]+)>"), (f, m, r) => new LinkCode(m, r, 1 / 16F, 0.85F, t => this.Controls.MousedElement is Paragraph.Link link && link.Token == t)); this.TextFormatter.Codes.Add(new Regex("<l(?: ([^>]+))?>"), (f, m, r) => new LinkCode(m, r, 1 / 16F, 0.85F, t => this.Controls.MousedElement is Paragraph.Link link && link.Token == t));
} }
public override void Update(GameTime time) { public override void Update(GameTime time) {