Changeset 8849 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2015-10-10T14:30:12+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/WikiReader.java
r8846 r8849 120 120 boolean transl = false; 121 121 boolean skip = false; 122 String b = "";123 String full = "";122 StringBuilder b = new StringBuilder(); 123 StringBuilder full = new StringBuilder(); 124 124 for (String line = in.readLine(); line != null; line = in.readLine()) { 125 full += line;125 full.append(line); 126 126 if (line.contains("<div id=\"searchable\">")) { 127 127 inside = true; … … 142 142 // add a border="0" attribute to images, otherwise the internal help browser 143 143 // will render a thick border around images inside an <a> element 144 b +=line.replaceAll("<img ", "<img border=\"0\" ")144 b.append(line.replaceAll("<img ", "<img border=\"0\" ") 145 145 .replaceAll("<span class=\"icon\">.</span>", "") 146 146 .replaceAll("href=\"/", "href=\"" + baseurl + '/') 147 .replaceAll(" />", ">") 148 + '\n';147 .replaceAll(" />", ">")) 148 .append('\n'); 149 149 } else if (transl && line.contains("</div>")) { 150 150 transl = false; … … 157 157 || b.indexOf(" does not exist. You can create it here.</p>") >= 0) 158 158 return ""; 159 if (b. isEmpty())159 if (b.length() == 0) 160 160 b = full; 161 161 return "<html><base href=\""+url.toExternalForm() +"\"> " + b + "</html>";
Note:
See TracChangeset
for help on using the changeset viewer.
