Skip to content

Commit 873e536

Browse files
committed
Fix some examples not displaying properly
1 parent 2a555e8 commit 873e536

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"vite-plugin-static-copy": "^0.16.0"
1515
},
1616
"dependencies": {
17-
"govuk-vue": "1.0.0-alpha.4"
17+
"govuk-vue": "1.0.0-alpha.5"
1818
}
1919
}

server/plugins/content.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ export default defineNitroPlugin((nitroApp) => {
4242
// Call the example component SFC we've just saved to disk
4343
// Temporarily change ```vue to ```converted so the regex doesn't pick it up next time round
4444
const exampleComponentName = exampleFilename.replace('.vue','');
45+
result = result.replace(codeBlock.groups.block, `\n\n
4546
46-
result = result.replace(cbRegex, `\n\n
4747
::gvd-code-sample
4848
#rendered
4949
<${exampleComponentName}/>
5050
5151
#code
52-
$<block>
52+
${codeBlock.groups.block.replace('```vue-html', '```converted-vue-html').replace('```vue', '```converted-vue')}
5353
::
54-
`).replace('```vue-html', '```converted-vue-html').replace('```vue', '```converted-vue')
54+
`)
5555
i++;
5656
} else {
5757
gotMatch = false;

0 commit comments

Comments
 (0)