Skip to content

Commit

Permalink
fix: Work around issue where numeric value is passed to prosemirror-m…
Browse files Browse the repository at this point in the history
…arkdown

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Feb 1, 2023
1 parent b37b770 commit 5d8905f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cypress/e2e/nodes/ImageView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('Image View', () => {
.should('contain', `/dav/files/${user.userId}/github.png`)
})

it('with preview', () => {
it.only('with preview', () => {
cy.get('.files-fileList tr[data-file="github.png"]')
.should('have.attr', 'data-id')
.then(imageId => {
Expand Down
1 change: 1 addition & 0 deletions src/nodes/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const Image = TiptapImage.extend({

/* Serializes an image node as a block image, so it ensures an image is always a block by itself */
toMarkdown(state, node, parent, index) {
node.attrs.alt = node.attrs.alt.toString()
defaultMarkdownSerializer.nodes.image(state, node, parent, index)
state.closeBlock(node)
},
Expand Down

0 comments on commit 5d8905f

Please sign in to comment.