Chore: remove some warning messages from metatagging
This commit is contained in:
parent
fa31fda3c0
commit
0c3cfdc034
1 changed files with 2 additions and 2 deletions
|
@ -102,8 +102,8 @@ export default class CreateNoteImportLayer extends Conversion<LayerConfigJson, L
|
||||||
render: trs(t.popupTitle, { title }),
|
render: trs(t.popupTitle, { title }),
|
||||||
},
|
},
|
||||||
calculatedTags: [
|
calculatedTags: [
|
||||||
"_first_comment=get(feat)('comments')[0].text.toLowerCase()",
|
"_first_comment=get(feat)('comments')[0]?.text?.toLowerCase() ?? ''",
|
||||||
"_trigger_index=(() => {const lines = feat.properties['_first_comment'].split('\\n'); const matchesMapCompleteURL = lines.map(l => l.match(\".*https://mapcomplete.\\(org|osm.be\\)/\\([a-zA-Z_-]+\\)\\(.html\\)?.*#import\")); const matchedIndexes = matchesMapCompleteURL.map((doesMatch, i) => [doesMatch !== null, i]).filter(v => v[0]).map(v => v[1]); return matchedIndexes[0] })()",
|
"_trigger_index=(() => {const lines = feat.properties['_first_comment']?.split('\\n') ?? []; const matchesMapCompleteURL = lines.map(l => l.match(\".*https://mapcomplete.\\(org|osm.be\\)/\\([a-zA-Z_-]+\\)\\(.html\\)?.*#import\")); const matchedIndexes = matchesMapCompleteURL.map((doesMatch, i) => [doesMatch !== null, i]).filter(v => v[0]).map(v => v[1]); return matchedIndexes[0] })()",
|
||||||
"_comments_count=get(feat)('comments').length",
|
"_comments_count=get(feat)('comments').length",
|
||||||
"_intro=(() => {const lines = get(feat)('comments')[0].text.split('\\n'); lines.splice(get(feat)('_trigger_index')-1, lines.length); return lines.filter(l => l !== '').join('<br/>');})()",
|
"_intro=(() => {const lines = get(feat)('comments')[0].text.split('\\n'); lines.splice(get(feat)('_trigger_index')-1, lines.length); return lines.filter(l => l !== '').join('<br/>');})()",
|
||||||
"_tags=(() => {let lines = get(feat)('comments')[0].text.split('\\n').map(l => l.trim()); lines.splice(0, get(feat)('_trigger_index') + 1); lines = lines.filter(l => l != ''); return lines.join(';');})()",
|
"_tags=(() => {let lines = get(feat)('comments')[0].text.split('\\n').map(l => l.trim()); lines.splice(0, get(feat)('_trigger_index') + 1); lines = lines.filter(l => l != ''); return lines.join(';');})()",
|
||||||
|
|
Loading…
Reference in a new issue