Provide a default replacement for @POS@ markers

This commit is contained in:
D. Berge
2021-05-14 23:17:54 +02:00
parent 900d7f7a3e
commit 42697fe91d

View File

@@ -16,8 +16,8 @@ Vue.filter('markdown', markdown);
Vue.filter('markdownInline', markdownInline); Vue.filter('markdownInline', markdownInline);
Vue.filter('position', (str, item, opts) => Vue.filter('position', (str, item, opts) =>
str str
.replace(/@POS(ITION)?@/g, geometryAsString(item, opts)) .replace(/@POS(ITION)?@/g, geometryAsString(item, opts) || "(position unknown)")
.replace(/@DMS@/g, geometryAsString(item, {...opts, dms:true})) .replace(/@DMS@/g, geometryAsString(item, {...opts, dms:true}) || "(position unknown)")
); );
// Vue.filter('position', (str, item, opts) => str.replace(/@POS(ITION)?@/, "☺")); // Vue.filter('position', (str, item, opts) => str.replace(/@POS(ITION)?@/, "☺"));