mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
@ -6,6 +6,7 @@
|
||||
bugs:
|
||||
- text: "Dark Theme: Render checkboxes in a lighter color"
|
||||
- text: "Fix Relative Parent links not working - #256"
|
||||
- test: "Improve inline tags regex - #265"
|
||||
|
||||
- version: "1.70"
|
||||
date: 2020-09-16
|
||||
|
@ -15,7 +15,7 @@ class InlineTagsProcessor {
|
||||
p = '\\+';
|
||||
}
|
||||
|
||||
var regexp = RegExp(r'(^|\s)' + p + r'([^ ]+)(\s|$)');
|
||||
var regexp = RegExp(r'(^|\s)' + p + r'([^\s]+)(\s|$)');
|
||||
var matches = regexp.allMatches(text);
|
||||
for (var match in matches) {
|
||||
var tag = match.group(2);
|
||||
|
@ -136,4 +136,17 @@ Enjoy!
|
||||
|
||||
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