Skip to content

Commit

Permalink
Merge pull request #2730 from nextcloud/fix/plaintext
Browse files Browse the repository at this point in the history
Fix typo in `serializePlainText`
  • Loading branch information
juliusknorr authored Jul 19, 2022
2 parents df28859 + 4487d25 commit 7966745
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/EditorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const serializePlainText = (tiptap) => {
const doc = tiptap.getJSON()

if (doc.content.length !== 1 || typeof doc.content[0].content === 'undefined' || doc.content[0].content.length !== 1) {
if (doc.content[0].type === 'code_block' && typeof doc.content[0].content === 'undefined') {
if (doc.content[0].type === 'codeBlock' && typeof doc.content[0].content === 'undefined') {
return ''
}
throw new SerializeException('Failed to serialize document to plain text')
Expand Down
1 change: 1 addition & 0 deletions src/helpers/mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const extensionHighlight = {
ml: 'ocaml',
rs: 'rust',
sci: 'scilab',
txt: 'plaintext',
vb: 'vbnet',
vbs: 'vbscript',
}
Expand Down

0 comments on commit 7966745

Please sign in to comment.