From 0d5cecb927205d056d0f4734a4dc6f87ef8cfb79 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Fri, 6 Dec 2019 17:48:28 +1000 Subject: [PATCH] Add support for per-document annotation guideline --- app/server/static/components/annotationMixin.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/server/static/components/annotationMixin.js b/app/server/static/components/annotationMixin.js index b1c1d2dd..d194252f 100644 --- a/app/server/static/components/annotationMixin.js +++ b/app/server/static/components/annotationMixin.js @@ -273,7 +273,13 @@ export default { }, compiledMarkdown() { - return marked(this.guideline, { + const documentMetadata = this.documentMetadata; + + const guideline = documentMetadata && documentMetadata.guideline + ? documentMetadata.guideline + : this.guideline; + + return marked(guideline, { sanitize: true, }); },