Changeset 18205 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/UploadDialogModel.java
r18173 r18205 75 75 Arrays.stream(comment.split("\\s", -1)) 76 76 .map(s -> Utils.strip(s, ",;")) 77 .filter(s -> s.matches("#[a-zA-Z ][-_a-zA-Z0-9]+"))77 .filter(s -> s.matches("#[a-zA-Z0-9][-_a-zA-Z0-9]+")) 78 78 .collect(Collectors.toList())); 79 79 return hashtags.isEmpty() ? null : hashtags; -
trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java
r18173 r18205 38 38 assertNull(model.findHashTags(" # ")); 39 39 assertNull(model.findHashTags(" https://example.com/#map ")); 40 assert Null(model.findHashTags("#59606086"));40 assertEquals("#59606086", model.findHashTags("#59606086")); 41 41 assertEquals("#foo", model.findHashTags(" #foo ")); 42 42 assertEquals("#foo;#bar", model.findHashTags(" #foo #bar baz"));
Note:
See TracChangeset
for help on using the changeset viewer.