From 24db82d8c198298e2994b1c9281854261c131c24 Mon Sep 17 00:00:00 2001 From: Viktor Bahr Date: Thu, 14 Apr 2022 17:49:13 +0200 Subject: [PATCH] feat(techdocs-node): accept sequence node custom tags This change to the MKDOCS_SCHEMA lets the validation logic accept custom tags that are sequence nodes as valid. Signed-off-by: Viktor Bahr --- plugins/techdocs-node/src/stages/generate/helpers.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/techdocs-node/src/stages/generate/helpers.ts b/plugins/techdocs-node/src/stages/generate/helpers.ts index 349783d2bd..d70793e043 100644 --- a/plugins/techdocs-node/src/stages/generate/helpers.ts +++ b/plugins/techdocs-node/src/stages/generate/helpers.ts @@ -134,6 +134,14 @@ export const MKDOCS_SCHEMA = DEFAULT_SCHEMA.extend([ instanceOf: UnknownTag, construct: (data: string, type?: string) => new UnknownTag(data, type), }), + new Type('', { + kind: 'sequence', + multi: true, + representName: o => (o as UnknownTag).type, + represent: o => (o as UnknownTag).data ?? '', + instanceOf: UnknownTag, + construct: (data: string, type?: string) => new UnknownTag(data, type), + }), ]); /**