File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ import Section from '~/components/section'
55import { mergeData } from 'vue-functional-data-merge'
66import { bootstrapVersion , vueVersion } from '~/content'
77
8+ const interpolate = ( template , ctx ) =>
9+ template . replace ( / \[ \[ ( [ \s \S ] + ?) \] \] / g, ( _ , key ) => {
10+ key = key . trim ( )
11+ return ctx [ key ] || ''
12+ } )
13+
814// @vue /component
915export default {
1016 name : 'BVMainDocs' ,
@@ -59,15 +65,13 @@ export default {
5965 const $quickLinks = h ( QuickLinks )
6066
6167 // Body section
62- const $bodySectionContent = h ( {
63- delimiters : [ '[[' , ']]' ] , // change the delimiters to avoid conflicts with code examples
64- data ( ) {
65- return {
68+ const $bodySectionContent = h ( 'div' , {
69+ domProps : {
70+ innerHTML : interpolate ( body || '' , {
6671 bootstrapVersion,
6772 vueVersion
68- }
69- } ,
70- template : `<div>${ body } </div>`
73+ } )
74+ }
7175 } )
7276
7377 const $bodySection = h (
You can’t perform that action at this time.
0 commit comments