Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
r8470 r8482 203 203 // Format 204 204 // tag1\tval1\ntag2\tval2\n 205 tags = readTagsByRegexp(buf, "[\\r\\n]+", ".* ([a-zA-Z0-9:_]+).*\\t(.*?)", false);205 tags = readTagsByRegexp(buf, "[\\r\\n]+", ".*?([a-zA-Z0-9:_]+).*\\t(.*?)", false); 206 206 // try "tag\tvalue\n" format 207 207 if (tags!=null) return tags; -
trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java
r7937 r8482 95 95 96 96 } 97 98 @Test 99 public void testTab() throws Exception { 100 Assert.assertEquals(TextTagParser.readTagsFromText("shop\tjewelry"), Collections.singletonMap("shop", "jewelry")); 101 Assert.assertEquals(TextTagParser.readTagsFromText("!shop\tjewelry"), Collections.singletonMap("shop", "jewelry")); 102 Assert.assertEquals(TextTagParser.readTagsFromText("!!!shop\tjewelry"), Collections.singletonMap("shop", "jewelry")); 103 Assert.assertEquals(TextTagParser.readTagsFromText("shop\t\t\tjewelry"), Collections.singletonMap("shop", "jewelry")); 104 } 97 105 }
Note:
See TracChangeset
for help on using the changeset viewer.