From 4eefb0651f3de88d1de32969747b1273c8dc5249 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ole=20Volds=C3=A6ter?= <ole.voldsater@uib.no>
Date: Mon, 14 Oct 2019 09:02:47 +0200
Subject: [PATCH] legger til url-framgment med definisjonbs-id i linker

---
 src/components/DefElement.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/DefElement.vue b/src/components/DefElement.vue
index 6583da68..8c16efac 100644
--- a/src/components/DefElement.vue
+++ b/src/components/DefElement.vue
@@ -20,7 +20,7 @@ export default {
       return this.body.items.map(
         function(item){
           if      (item.type == 'usage') return {type: item.type, html: item.text}
-          else if (item.type == 'article_ref') return {type: item.type, html: `<a href="${item.article_id}">${item.lemmas.join(',')}</a>`}
+          else if (item.type == 'article_ref') return {type: item.type, html: `<a href="${item.article_id}${item.definition_id ? '#def'+item.definition_id : ''}">${item.lemmas.join(',')}</a>`}
           else if (item.id) return {type: item.type, html: entities[item.id] || languages[item.id] || item.id}
           else return {type: item.type || 'plain', html: item}
         }
-- 
GitLab