Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions docs/components/main-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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: `<div>${body}</div>`
})
}
})

const $bodySection = h(
Expand Down