mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
@ -6,6 +6,7 @@
|
|||||||
bugs:
|
bugs:
|
||||||
- text: "Dark Theme: Render checkboxes in a lighter color"
|
- text: "Dark Theme: Render checkboxes in a lighter color"
|
||||||
- text: "Fix Relative Parent links not working - #256"
|
- text: "Fix Relative Parent links not working - #256"
|
||||||
|
- test: "Improve inline tags regex - #265"
|
||||||
|
|
||||||
- version: "1.70"
|
- version: "1.70"
|
||||||
date: 2020-09-16
|
date: 2020-09-16
|
||||||
|
@ -15,7 +15,7 @@ class InlineTagsProcessor {
|
|||||||
p = '\\+';
|
p = '\\+';
|
||||||
}
|
}
|
||||||
|
|
||||||
var regexp = RegExp(r'(^|\s)' + p + r'([^ ]+)(\s|$)');
|
var regexp = RegExp(r'(^|\s)' + p + r'([^\s]+)(\s|$)');
|
||||||
var matches = regexp.allMatches(text);
|
var matches = regexp.allMatches(text);
|
||||||
for (var match in matches) {
|
for (var match in matches) {
|
||||||
var tag = match.group(2);
|
var tag = match.group(2);
|
||||||
|
@ -136,4 +136,17 @@ Enjoy!
|
|||||||
|
|
||||||
expect(tags, {'hello'});
|
expect(tags, {'hello'});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("Handles Spaces", () {
|
||||||
|
var body = """# DateTimeOffset
|
||||||
|
#csharp
|
||||||
|
|
||||||
|
Provides a combined #structure\tof `DateTime` with an `Offset` property defining a deviation from UTC. It doesn't associate a time zone with the offset.
|
||||||
|
""";
|
||||||
|
|
||||||
|
var p = InlineTagsProcessor(tagPrefixes: {'#', '+', '@'});
|
||||||
|
var tags = p.extractTags(body);
|
||||||
|
|
||||||
|
expect(tags, {'csharp', 'structure'});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user