From 02b5ca16d0fd61cdda9b9f3ba59334c1e01f4302 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Thu, 30 Jul 2020 20:44:09 +0200
Subject: [PATCH 01/19] create editor component
---
packages/content/templates/editor.vue | 61 +++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 packages/content/templates/editor.vue
diff --git a/packages/content/templates/editor.vue b/packages/content/templates/editor.vue
new file mode 100644
index 000000000..18c7f350d
--- /dev/null
+++ b/packages/content/templates/editor.vue
@@ -0,0 +1,61 @@
+
+
+
+
From 1a489ac9ae3cdf472f6c9b105c0fc2225f8a1903 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Thu, 30 Jul 2020 20:46:06 +0200
Subject: [PATCH 02/19] register files
---
packages/content/lib/index.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/packages/content/lib/index.js b/packages/content/lib/index.js
index 66d0d1b3a..cec54319b 100644
--- a/packages/content/lib/index.js
+++ b/packages/content/lib/index.js
@@ -207,9 +207,15 @@ module.exports = async function (moduleOptions) {
fileName: 'content/nuxt-content.dev.vue',
src: join(__dirname, '../templates/nuxt-content.dev.vue'),
options: {
- apiPrefix: options.apiPrefixWithBase
+ apiPrefix: options.apiPrefixWithBase,
+ editor: options.editor || './editor.vue'
}
})
+ // Add dev editor component
+ this.addTemplate({
+ fileName: 'content/editor.vue',
+ src: join(__dirname, 'templates/editor.vue')
+ })
}
function isUrl (string) {
From d65ade64cf5fa99a34134cd243520dfe57ba400c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Thu, 30 Jul 2020 20:48:22 +0200
Subject: [PATCH 03/19] Update nuxt-content.dev.vue
---
.../content/templates/nuxt-content.dev.vue | 48 +++++--------------
1 file changed, 12 insertions(+), 36 deletions(-)
diff --git a/packages/content/templates/nuxt-content.dev.vue b/packages/content/templates/nuxt-content.dev.vue
index c5b6b07b1..9cd34a8ce 100644
--- a/packages/content/templates/nuxt-content.dev.vue
+++ b/packages/content/templates/nuxt-content.dev.vue
@@ -1,15 +1,14 @@
-
+
+
+
import NuxtContent from './nuxt-content'
+import Editor from '<%= options.editor %>';
export default {
name: 'NuxtContent',
components: {
- NuxtContentDev: NuxtContent
+ NuxtContentDev: NuxtContent,
+ Editor
},
props: NuxtContent.props,
data () {
@@ -94,31 +95,6 @@ export default {
},
waitFor (ms) {
return new Promise(resolve => setTimeout(resolve, ms))
- },
- onType () {
- const el = this.$refs.textarea
-
- el.style.height = el.scrollHeight + 'px'
- },
- onTabRight (event) {
- let text = this.file,
- originalSelectionStart = event.target.selectionStart,
- textStart = text.slice(0, originalSelectionStart),
- textEnd = text.slice(originalSelectionStart)
-
- this.file = `${textStart}\t${textEnd}`
- event.target.value = this.file // required to make the cursor stay in place.
- event.target.selectionEnd = event.target.selectionStart = originalSelectionStart + 1
- },
- onTabLeft (event) {
- let text = this.file,
- originalSelectionStart = event.target.selectionStart,
- textStart = text.slice(0, originalSelectionStart),
- textEnd = text.slice(originalSelectionStart)
-
- this.file = `${textStart.replace(/\t$/, '')}${textEnd}`
- event.target.value = this.file // required to make the cursor stay in place.
- event.target.selectionEnd = event.target.selectionStart = originalSelectionStart - 1
}
}
}
From 86e606053b223bde981df0046baf2b3a13b8ae92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sat, 1 Aug 2020 13:45:38 +0200
Subject: [PATCH 04/19] set default
---
packages/content/lib/utils.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/content/lib/utils.js b/packages/content/lib/utils.js
index 0f71139b7..d0770aa9d 100644
--- a/packages/content/lib/utils.js
+++ b/packages/content/lib/utils.js
@@ -2,6 +2,7 @@ const logger = require('consola').withScope('@nuxt/content')
const { camelCase } = require('change-case')
const getDefaults = ({ dev = false } = {}) => ({
+ editor: './editor.vue',
watch: dev,
liveEdit: true,
apiPrefix: '_content',
From 588b11e837a303476d3c53070b18b41d400502bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sat, 1 Aug 2020 13:46:52 +0200
Subject: [PATCH 05/19] set default
---
packages/content/lib/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/content/lib/index.js b/packages/content/lib/index.js
index cec54319b..6be73bfbc 100644
--- a/packages/content/lib/index.js
+++ b/packages/content/lib/index.js
@@ -208,7 +208,7 @@ module.exports = async function (moduleOptions) {
src: join(__dirname, '../templates/nuxt-content.dev.vue'),
options: {
apiPrefix: options.apiPrefixWithBase,
- editor: options.editor || './editor.vue'
+ editor: options.editor
}
})
// Add dev editor component
From c28118273f6f83bce49438c8892cd464e7d269d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sun, 2 Aug 2020 08:12:37 +0200
Subject: [PATCH 06/19] bugfix of rebase
---
packages/content/lib/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/content/lib/index.js b/packages/content/lib/index.js
index 6f9887a37..3fef1a35e 100644
--- a/packages/content/lib/index.js
+++ b/packages/content/lib/index.js
@@ -215,7 +215,7 @@ module.exports = async function (moduleOptions) {
// Add dev editor component
this.addTemplate({
fileName: 'content/editor.vue',
- src: join(__dirname, 'templates/editor.vue')
+ src: join(__dirname, '../templates/editor.vue')
})
}
From af0698020b0171612380de959e50d1b5e2d2e63b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sun, 2 Aug 2020 08:18:11 +0200
Subject: [PATCH 07/19] remove textarea refs in nuxt-content.dev.vue.
---
packages/content/templates/nuxt-content.dev.vue | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/packages/content/templates/nuxt-content.dev.vue b/packages/content/templates/nuxt-content.dev.vue
index 9cd34a8ce..1a9193a5b 100644
--- a/packages/content/templates/nuxt-content.dev.vue
+++ b/packages/content/templates/nuxt-content.dev.vue
@@ -75,15 +75,15 @@ export default {
return
}
// Start editing mode
- const contentHeight = this.$refs.content.offsetHeight
- const actualScrollY = window.scrollY
+ // const contentHeight = this.$refs.content.offsetHeight
+ // const actualScrollY = window.scrollY
// Fetch file content
await this.fetchFile()
this.isEditing = true
- this.$refs.textarea.style.minHeight = `${contentHeight}px`
- await this.waitFor(10)
- this.$refs.textarea.focus()
- this.onType()
+ // this.$refs.textarea.style.minHeight = `${contentHeight}px`
+ // await this.waitFor(10)
+ // this.$refs.textarea.focus()
+ // this.onType()
await this.waitFor(10)
window.scrollTo(window.scrollX, actualScrollY)
},
From a1f3c1e5421976043cd0f312bab9caef3cd0501e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sun, 2 Aug 2020 08:24:21 +0200
Subject: [PATCH 08/19] optimize code
---
packages/content/templates/nuxt-content.dev.vue | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/packages/content/templates/nuxt-content.dev.vue b/packages/content/templates/nuxt-content.dev.vue
index 1a9193a5b..0446c8f2f 100644
--- a/packages/content/templates/nuxt-content.dev.vue
+++ b/packages/content/templates/nuxt-content.dev.vue
@@ -74,18 +74,10 @@ export default {
this.isEditing = false
return
}
- // Start editing mode
- // const contentHeight = this.$refs.content.offsetHeight
- // const actualScrollY = window.scrollY
// Fetch file content
await this.fetchFile()
+ // Start editing mode
this.isEditing = true
- // this.$refs.textarea.style.minHeight = `${contentHeight}px`
- // await this.waitFor(10)
- // this.$refs.textarea.focus()
- // this.onType()
- await this.waitFor(10)
- window.scrollTo(window.scrollX, actualScrollY)
},
async fetchFile () {
this.file = await fetch(this.fileUrl).then(res => res.text())
From 825e3a172abb360f71fdb2727bf311bd6d8014fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sun, 2 Aug 2020 08:30:28 +0200
Subject: [PATCH 09/19] change default to better path
---
packages/content/lib/utils.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/content/lib/utils.js b/packages/content/lib/utils.js
index d0770aa9d..f2dca0e5c 100644
--- a/packages/content/lib/utils.js
+++ b/packages/content/lib/utils.js
@@ -2,7 +2,7 @@ const logger = require('consola').withScope('@nuxt/content')
const { camelCase } = require('change-case')
const getDefaults = ({ dev = false } = {}) => ({
- editor: './editor.vue',
+ editor: '~/.nuxt/content/editor.vue',
watch: dev,
liveEdit: true,
apiPrefix: '_content',
From 2c68346fd99f84af7bcce2dc76c45c888499aa99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sun, 2 Aug 2020 08:44:42 +0200
Subject: [PATCH 10/19] add first version of docs
---
docs/content/en/configuration.md | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/docs/content/en/configuration.md b/docs/content/en/configuration.md
index be414ca3d..b8de4ec00 100644
--- a/docs/content/en/configuration.md
+++ b/docs/content/en/configuration.md
@@ -328,7 +328,7 @@ To add your custom parser write a function that gets as an argument the content
**Example**
-```
+```js{}[nuxt.config.js]
const parseTxt = file => file.split('\n').map(line => line.trim())
// in Config:
@@ -340,11 +340,35 @@ const parseTxt = file => file.split('\n').map(line => line.trim())
}
```
+### `editor`
+
+You can provide a custom Editor for editing your markdownfiles in development mode. Just set the `editor` option to a path to your editor component. The code of the default editor you can find [here](https://github.com/nuxt/content/blob/dev/packages/master/templates/editor.vue).
+
+
+```js{}[nuxt.config.js]
+// in Config
+
+{
+ editor: '~/path/to/editor/component.vue'
+}
+```
+
+Your component should implement the following 3 things:
+
+1. `v-model` for getting the markdown code.
+2. prop `isEditing` is a boolean with the information if the editing is started and the component is shown. (this is optional)
+3. when finished editing your component has to emit `endEdit`
+
+
+You should be aware that you get the full markdown file content so this includes the front-matter. You can use `gray-matter` to split and join the markdown and the front-matter.
+
+
## Defaults
```js{}[nuxt.config.js]
export default {
content: {
+ editor: '~/.nuxt/content/editor.vue',
apiPrefix: '_content',
dir: 'content',
fullTextSearchFields: ['title', 'description', 'slug', 'text'],
From b2e7c445bdc5fee37701b6b3c745dd5b0bc0c2b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sun, 2 Aug 2020 08:50:47 +0200
Subject: [PATCH 11/19] linkfix
---
docs/content/en/configuration.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/content/en/configuration.md b/docs/content/en/configuration.md
index b8de4ec00..2d37fde9e 100644
--- a/docs/content/en/configuration.md
+++ b/docs/content/en/configuration.md
@@ -342,7 +342,7 @@ const parseTxt = file => file.split('\n').map(line => line.trim())
### `editor`
-You can provide a custom Editor for editing your markdownfiles in development mode. Just set the `editor` option to a path to your editor component. The code of the default editor you can find [here](https://github.com/nuxt/content/blob/dev/packages/master/templates/editor.vue).
+You can provide a custom Editor for editing your markdownfiles in development mode. Just set the `editor` option to a path to your editor component. The code of the default editor you can find [here](https://github.com/nuxt/content/blob/master/packages/content/templates/editor.vue).
```js{}[nuxt.config.js]
From 53739eaf3ee784da32ba052046cc08b00ec903a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Sun, 2 Aug 2020 10:03:07 +0200
Subject: [PATCH 12/19] fix path
---
packages/content/lib/utils.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/content/lib/utils.js b/packages/content/lib/utils.js
index f2dca0e5c..d0770aa9d 100644
--- a/packages/content/lib/utils.js
+++ b/packages/content/lib/utils.js
@@ -2,7 +2,7 @@ const logger = require('consola').withScope('@nuxt/content')
const { camelCase } = require('change-case')
const getDefaults = ({ dev = false } = {}) => ({
- editor: '~/.nuxt/content/editor.vue',
+ editor: './editor.vue',
watch: dev,
liveEdit: true,
apiPrefix: '_content',
From 207ee8c2e20190d32633f25e99955008bfa33675 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Wed, 5 Aug 2020 12:29:38 +0200
Subject: [PATCH 13/19] Update docs/content/en/configuration.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Sébastien Chopin
---
docs/content/en/configuration.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/content/en/configuration.md b/docs/content/en/configuration.md
index 2d37fde9e..2c2f47d77 100644
--- a/docs/content/en/configuration.md
+++ b/docs/content/en/configuration.md
@@ -342,7 +342,7 @@ const parseTxt = file => file.split('\n').map(line => line.trim())
### `editor`
-You can provide a custom Editor for editing your markdownfiles in development mode. Just set the `editor` option to a path to your editor component. The code of the default editor you can find [here](https://github.com/nuxt/content/blob/master/packages/content/templates/editor.vue).
+You can provide a custom editor for editing your markdown files in development. Set the `editor` option to a path to your editor component. The code of the default editor you can find [here](https://github.com/nuxt/content/blob/master/packages/content/templates/editor.vue).
```js{}[nuxt.config.js]
From 28bc46f1d3d2a1eeebafeda566a93ce488feb5ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Wed, 5 Aug 2020 12:30:15 +0200
Subject: [PATCH 14/19] Update docs/content/en/configuration.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Sébastien Chopin
---
docs/content/en/configuration.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/content/en/configuration.md b/docs/content/en/configuration.md
index 2c2f47d77..45fe6de5d 100644
--- a/docs/content/en/configuration.md
+++ b/docs/content/en/configuration.md
@@ -353,7 +353,7 @@ You can provide a custom editor for editing your markdown files in development.
}
```
-Your component should implement the following 3 things:
+Your component should implement the following:
1. `v-model` for getting the markdown code.
2. prop `isEditing` is a boolean with the information if the editing is started and the component is shown. (this is optional)
From d4b7cd5beda144e53ef373ad3b0e03d4cf7a47ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Wed, 5 Aug 2020 12:30:32 +0200
Subject: [PATCH 15/19] Update packages/content/lib/index.js
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Sébastien Chopin
---
packages/content/lib/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/content/lib/index.js b/packages/content/lib/index.js
index 3fef1a35e..adbda8fa6 100644
--- a/packages/content/lib/index.js
+++ b/packages/content/lib/index.js
@@ -215,7 +215,7 @@ module.exports = async function (moduleOptions) {
// Add dev editor component
this.addTemplate({
fileName: 'content/editor.vue',
- src: join(__dirname, '../templates/editor.vue')
+ src: join(__dirname, '..', 'templates', 'editor.vue')
})
}
From 313fb1456c6b8634e9c907fb64903d56b90cfb8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Wed, 5 Aug 2020 12:31:55 +0200
Subject: [PATCH 16/19] Update configuration.md
---
docs/content/en/configuration.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/content/en/configuration.md b/docs/content/en/configuration.md
index 45fe6de5d..10b9ed8fa 100644
--- a/docs/content/en/configuration.md
+++ b/docs/content/en/configuration.md
@@ -346,9 +346,7 @@ You can provide a custom editor for editing your markdown files in development.
```js{}[nuxt.config.js]
-// in Config
-
-{
+content: {
editor: '~/path/to/editor/component.vue'
}
```
From 24b1367c843a9ef9d0050ad503319faf7eb31142 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Fri, 7 Aug 2020 21:07:56 +0200
Subject: [PATCH 17/19] add tests
---
test/editor.test.js | 62 ++++++++++++++++++++++++++++++
test/fixture/components/editor.vue | 3 ++
2 files changed, 65 insertions(+)
create mode 100644 test/editor.test.js
create mode 100644 test/fixture/components/editor.vue
diff --git a/test/editor.test.js b/test/editor.test.js
new file mode 100644
index 000000000..1292336a7
--- /dev/null
+++ b/test/editor.test.js
@@ -0,0 +1,62 @@
+const path = require('path')
+const { createBrowser } = require('tib')
+const { setup, loadConfig, url } = require('@nuxtjs/module-test-utils')
+
+describe('editor option', () => {
+ let nuxt, browser, page
+
+ describe('alias works', () => {
+ test('lokal alias', async () => {
+ ({ nuxt } = (await setup({
+ ...loadConfig(__dirname),
+ buildDir: path.join(__dirname, 'fixture', '.nuxt-dev'),
+ content: { watch: true, editor: '~/.nuxt-dev/content/editor.vue' }
+ })))
+
+ browser = await createBrowser('puppeteer')
+ page = await browser.page(url('/home'))
+ const html = await page.getHtml()
+
+ expect(html).toMatch(/.*<\/h1>\s*<\/textarea>\s*This is the home page!<\/p><\/div><\/div><\/div>/)
+
+ await nuxt.close()
+ await browser.close()
+ }, 60000)
+
+ test('module resolution', async () => {
+ ({ nuxt } = (await setup({
+ ...loadConfig(__dirname),
+ buildDir: path.join(__dirname, 'fixture', '.nuxt-dev'),
+ content: { watch: true, editor: '@nuxt/content/templates/editor.vue' },
+ })))
+
+ browser = await createBrowser('puppeteer')
+ page = await browser.page(url('/home'))
+ const html = await page.getHtml()
+
+ expect(html).toMatch(/.*<\/h1>\s*<\/textarea>\s*This is the home page!<\/p><\/div><\/div><\/div>/)
+
+ await nuxt.close()
+ await browser.close()
+ }, 60000)
+ })
+
+ describe('replacing works', () => {
+ test('replacing', async () => {
+ ({ nuxt } = (await setup({
+ ...loadConfig(__dirname),
+ buildDir: path.join(__dirname, 'fixture', '.nuxt-dev'),
+ content: { watch: true, editor: '~/components/editor.vue' }
+ })))
+
+ browser = await createBrowser('puppeteer')
+ page = await browser.page(url('/home'))
+ const html = await page.getHtml()
+
+ expect(html).toMatch(/.*<\/h1>\s*This is the home page!<\/p><\/div><\/div><\/div>/)
+
+ await nuxt.close()
+ await browser.close()
+ }, 60000)
+ })
+})
diff --git a/test/fixture/components/editor.vue b/test/fixture/components/editor.vue
new file mode 100644
index 000000000..6589ab7a5
--- /dev/null
+++ b/test/fixture/components/editor.vue
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
From 2a613f35a4bfba4b3dffab82e262f8ebe5111ee7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Fri, 7 Aug 2020 21:12:23 +0200
Subject: [PATCH 18/19] fix linting
---
test/editor.test.js | 2 +-
test/fixture/components/editor.vue | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/editor.test.js b/test/editor.test.js
index 1292336a7..c1fd1d954 100644
--- a/test/editor.test.js
+++ b/test/editor.test.js
@@ -27,7 +27,7 @@ describe('editor option', () => {
({ nuxt } = (await setup({
...loadConfig(__dirname),
buildDir: path.join(__dirname, 'fixture', '.nuxt-dev'),
- content: { watch: true, editor: '@nuxt/content/templates/editor.vue' },
+ content: { watch: true, editor: '@nuxt/content/templates/editor.vue' }
})))
browser = await createBrowser('puppeteer')
diff --git a/test/fixture/components/editor.vue b/test/fixture/components/editor.vue
index 6589ab7a5..44243fbe9 100644
--- a/test/fixture/components/editor.vue
+++ b/test/fixture/components/editor.vue
@@ -1,3 +1,3 @@
-
\ No newline at end of file
+
From fb3bbebb07a6d248f068d7ef6a81ff97f8c106c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de>
Date: Fri, 7 Aug 2020 21:15:46 +0200
Subject: [PATCH 19/19] testfix
---
test/editor.test.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/editor.test.js b/test/editor.test.js
index c1fd1d954..119b9ab45 100644
--- a/test/editor.test.js
+++ b/test/editor.test.js
@@ -53,7 +53,7 @@ describe('editor option', () => {
page = await browser.page(url('/home'))
const html = await page.getHtml()
- expect(html).toMatch(/.*<\/h1>\s*This is the home page!<\/p><\/div><\/div><\/div>/)
+ expect(html).toMatch(/.*<\/h1>\s*<\/div>\s*
This is the home page!<\/p><\/div><\/div><\/div>/)
await nuxt.close()
await browser.close()