From e975e26f3096b5a806f2ca6dd7d3bb20453d80cb Mon Sep 17 00:00:00 2001 From: Rafael Botazini Date: Wed, 5 Nov 2025 19:07:38 -0300 Subject: [PATCH] chore(docs): fix components examples not rendering --- docs/components/main-docs.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/components/main-docs.js b/docs/components/main-docs.js index c6f051f1143..ef5b09aed71 100644 --- a/docs/components/main-docs.js +++ b/docs/components/main-docs.js @@ -5,6 +5,12 @@ import Section from '~/components/section' import { mergeData } from 'vue-functional-data-merge' import { bootstrapVersion, vueVersion } from '~/content' +const interpolate = (template, ctx) => + template.replace(/\[\[([\s\S]+?)\]\]/g, (_, key) => { + key = key.trim() + return ctx[key] || '' + }) + // @vue/component export default { name: 'BVMainDocs', @@ -59,15 +65,13 @@ export default { const $quickLinks = h(QuickLinks) // Body section - const $bodySectionContent = h({ - delimiters: ['[[', ']]'], // change the delimiters to avoid conflicts with code examples - data() { - return { + const $bodySectionContent = h('div', { + domProps: { + innerHTML: interpolate(body || '', { bootstrapVersion, vueVersion - } - }, - template: `
${body}
` + }) + } }) const $bodySection = h(