Changeset 18205 in josm


Ignore:
Timestamp:
2021-09-11T14:00:16+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #21309 - allow changeset hashtags to start with digits (patch by marcello)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialogModel.java

    r18173 r18205  
    7575            Arrays.stream(comment.split("\\s", -1))
    7676                .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]+"))
    7878                .collect(Collectors.toList()));
    7979        return hashtags.isEmpty() ? null : hashtags;
  • trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java

    r18173 r18205  
    3838        assertNull(model.findHashTags(" # "));
    3939        assertNull(model.findHashTags(" https://example.com/#map "));
    40         assertNull(model.findHashTags("#59606086"));
     40        assertEquals("#59606086", model.findHashTags("#59606086"));
    4141        assertEquals("#foo", model.findHashTags(" #foo "));
    4242        assertEquals("#foo;#bar", model.findHashTags(" #foo #bar baz"));
Note: See TracChangeset for help on using the changeset viewer.