Skip to content

Commit

Permalink
Merge pull request #3535 from bjornfor/add-asciidoc-mimetype
Browse files Browse the repository at this point in the history
Add text/asciidoc mimetype
  • Loading branch information
max-nextcloud authored Dec 8, 2022
2 parents 535fcbe + cff42c0 commit eea1ade
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 15 deletions.
8 changes: 8 additions & 0 deletions cypress/e2e/files.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ describe('Text and server mimetypes', () => {
cy.getContent().find('pre').should('exist')
})

it('handle asciidoc as plaintext for now', () => {
cy.uploadFile('test.adoc', 'text/asciidoc', 'hello.adoc')
cy.visit('/apps/files')
cy.get('#app-content-files table tr').should('contain', 'hello.adoc')
cy.openFile('hello.adoc')
cy.getContent().find('pre').should('contain', 'Hello world')
})

it('handle markdown with richtext editor', () => {
cy.uploadFile('test.md', 'text/markdown', 'markdown.md')
cy.visit('/apps/files')
Expand Down
1 change: 1 addition & 0 deletions cypress/fixtures/test.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
= Hello world
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.

1 change: 1 addition & 0 deletions src/helpers/mime.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const openMimetypesPlainText = [
'application/x-tex',
'application/xml',
'application/yaml',
'text/asciidoc',
'text/css',
'text/html',
'text/org',
Expand Down

0 comments on commit eea1ade

Please sign in to comment.