Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)Author
2021-07-18Update use of `OCA.Viewer` api to the nextcloud 22 versionAzul
Looks like the [accessor to state] was removed from the Viewer api and replaced with [separate getters]. So we need to replace `OCA.Viewer.state.file` with `OCA.Viewer.file`. Fixes #1676 [accessor to state]: (https://github.com/nextcloud/viewer/commit/dbfa6bc8ead717530001a981b7d442510bf8d897#diff-c29528ea58a2d0307765d4357b88c9a469c148ccca2d82b653dbb97290ab6ab1L52-L63) [separate getters]: (https://github.com/nextcloud/viewer/commit/dbfa6bc8ead717530001a981b7d442510bf8d897#diff-c29528ea58a2d0307765d4357b88c9a469c148ccca2d82b653dbb97290ab6ab1R79-R81) Signed-off-by: Azul <azul@riseup.net>
2020-09-25Fix images in public linksJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-11fix: use Viewer state to determine current dirAzul
This is more relyable then parsing the window location query for dir: * ?dir does not change when navigating between files right now * ?dir is not present when the viewer is used from within other apps. We used to fallback to the viewer state which solved the latter. However it is easier and less error prone to just rely on viewer state in the first place. Signed-off-by: Azul <azul@riseup.net>
2020-08-11links with complete urlsAzul
This way they also work if the viewer was opened from other apps than the file app. Also move the `relPath` param into the fragment. It is only used to remember the relative path for generating the short markdown form from the link. Signed-off-by: Azul <azul@riseup.net>
2020-08-11calculate dir for relative linksAzul
Signed-off-by: Azul <azul@riseup.net>
2020-08-11rewrite links to local filesAzul
The markdown we create for links to local files looks like this: ``` [Check this out!](subdir/file.md?fileid=123) ``` Turn this into a link like this ``` <a href="?dir=/current&openfile=123&relPath=subdir/file.md"> Check this out! </a> ``` The `relPath` part of the url is needed to convert it back to the original markdown. Includes a test. Next steps: * open links to local files in same tab. * change dir param according to relative Path. Signed-off-by: Azul <azul@riseup.net>
2020-08-11refactor: define our own Link mark to rewrite hrefsAzul
The short relative links used in markdown need to be converted to working urls in the href attributes. In order to properly serialize the content the full urls in html need to be converted to relative links as well. This commit splits out the href handling into a new helper. This way it can be easily tested. Signed-off-by: Azul <azul@riseup.net>
2020-06-16Adjust ignored tests that fail due to whitespace changesJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-06-16Update spec to commonmark 0.29Julius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-06-09allow relative image sources with fileidAzul
includes a unit test for turning the src in markdown into a src for html that can be resolved by nextcloud Signed-off-by: Azul <azul@riseup.net>
2019-12-02Fix espacing and cover with tests (fixes #325)Julius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02Implement checkbox supportJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-09-04Use tightLists optionJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-07-10Keep checkboxes as plain textJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-05Add test vectorsJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-02Use text node to serialize plain textJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-02Fix testsJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-02Allow plain text editing of filesJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-25Fix testsJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-12Add basic tests for markdown serializerJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-11TestsJulius Härtl
Signed-off-by: Julius Härtl <jus@bitgrid.net>