forked from organicmaps/organicmaps
[generator] More comments for wikipedia tags processing
This commit is contained in:
parent
c0a444935d
commit
2e4bc5836e
1 changed files with 2 additions and 2 deletions
|
@ -219,7 +219,7 @@ protected:
|
|||
if (i == string::npos || i < 2 || i + 2 > v.length())
|
||||
return string();
|
||||
|
||||
// URL encode lang:title, so URL can be reconstructed faster
|
||||
// URL encode lang:title (lang is at most 3 chars), so URL can be reconstructed faster
|
||||
if (i <= 3 || v.substr(0, i) == "be-x-old")
|
||||
return v.substr(0, i + 1) + WikiUrlEncode(v.substr(i + 1));
|
||||
|
||||
|
@ -227,7 +227,7 @@ protected:
|
|||
if (v[i+1] == '/' && i + minUrlPartLength < v.length())
|
||||
{
|
||||
// Convert URL to "lang:title"
|
||||
i += 3;
|
||||
i += 3; // skip "://"
|
||||
string::size_type const j = v.find('.', i + 1);
|
||||
static string const wikiUrlPart = ".wikipedia.org/wiki/";
|
||||
if (j != string::npos && v.substr(j, wikiUrlPart.length()) == wikiUrlPart)
|
||||
|
|
Loading…
Add table
Reference in a new issue