Skip to content

Commit

Permalink
bugfix: fixed code node
Browse files Browse the repository at this point in the history
  • Loading branch information
freb97 committed Jul 14, 2024
1 parent 7d4bdfc commit bf1bc0c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.8
- Fixed code node handling - Thanks to @TRiBotWillB
- Bumped dependencies

# 1.0.7
- Added stackblitz configuration
- Bumped dependencies
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ Custom blockquote and code tags (`<blockquote>`, `<pre>`):
<!-- components/StrapiBlocksTextCodeNode.vue -->
<template>
<pre class="my-custom-class-for-pre">
<slot />
</pre>
<pre class="my-custom-class-for-pre"><slot /></pre>
</template>
```
Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-strapi-blocks-renderer",
"version": "1.0.7",
"version": "1.0.8",
"description": "Renderer for the strapi CMS blocks text content element.",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -38,26 +38,29 @@
"test:watch": "vitest watch"
},
"dependencies": {
"@nuxt/kit": "^3.12.2",
"@nuxt/kit": "^3.12.3",
"defu": "^6.1.4"
},
"devDependencies": {
"@nuxt/devtools": "^1.3.7",
"@nuxt/devtools": "^1.3.9",
"@nuxt/eslint-config": "^0.3.13",
"@nuxt/module-builder": "^0.8.0",
"@nuxt/schema": "^3.12.2",
"@nuxt/module-builder": "^0.8.1",
"@nuxt/schema": "^3.12.3",
"@nuxt/test-utils": "^3.13.1",
"@stylistic/eslint-plugin": "^2.3.0",
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"eslint": "^8.57.0",
"nuxt": "^3.12.2",
"typescript": "^5.5.2",
"nuxt": "^3.12.3",
"typescript": "^5.5.3",
"vitest": "^1.6.0",
"vue": "^3.4.31",
"vue-eslint-parser": "^9.4.3",
"vue-tsc": "^2.0.22"
"vue-tsc": "^2.0.26"
},
"keywords": [
"nuxt", "nuxt3", "nuxtjs", "nuxt-module", "strapi", "strapi-cms", "json", "blocks"
],
"packageManager": "npm@10.2.4",
"engines": {
"node": "^18.x || ^20.x"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<template>
<pre style="color: red;">
<slot />
</pre>
<pre style="color: red;"><slot /></pre>
</template>
2 changes: 1 addition & 1 deletion test/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Basic blocks text rendering', async (): Promise<void> => {
it('Renders the code node', async (): Promise<void> => {
const html: string = await fetchPage();

expect(html).toContain('<pre> Code\n </pre>');
expect(html).toContain('<pre>Code</pre>');
});

it('Renders the image node', async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion test/custom.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('Custom blocks text rendering', async (): Promise<void> => {
it('Renders the custom code node', async (): Promise<void> => {
const html: string = await fetchPage();

expect(html).toContain('<pre style="color:red;"> Code\n </pre>');
expect(html).toContain('<pre style="color:red;">Code</pre>');
});

it('Renders the custom image node', async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<template>
<pre style="color: red;">
<slot />
</pre>
<pre style="color: red;"><slot /></pre>
</template>

0 comments on commit bf1bc0c

Please sign in to comment.