1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Compare commits

...

94 Commits

Author SHA1 Message Date
Laurent Cozic
53a857b706 Electron release v1.0.199 2020-04-10 19:16:48 +01:00
Laurent Cozic
4f5473f8a2 All: Display WYSIWYG info in config screen only in desktop app 2020-04-10 19:16:18 +01:00
Laurent Cozic
1b617a4adc Android release v1.0.326 2020-04-10 18:57:20 +01:00
Laurent Cozic
7741a43d42 Electron release v1.0.198 2020-04-10 18:53:04 +01:00
Laurent Cozic
776411f882 Desktop: WYSIWYG: Added support for tables 2020-04-10 18:22:17 +00:00
Laurent Cozic
ae4cecc621 Desktop: WYSIWYG: Handle internal note links 2020-04-10 17:59:51 +00:00
Laurent Cozic
5be98a46e3 Desktop: WYSIWYG: Improved documentation on what plugins are compatible with WYSIWYG editor 2020-04-10 17:33:09 +00:00
Laurent Cozic
bd99b25848 Desktop: WYSIWYG: Preserve HTML code in Markdown when editing from wysiwyg editor 2020-04-10 17:12:41 +00:00
Laurent Cozic
12a7b3c73c Desktop: WYSIWYG: Do not display target list in link dialog 2020-04-09 19:05:07 +01:00
Laurent Cozic
75b28c46af Desktop: Wait for note to be saved before closing the app 2020-04-09 18:57:20 +01:00
Laurent Cozic
93dccf62df Desktop: WYSIWYG: Added support for custom icon package and set Attach toolbar icon 2020-04-09 17:49:56 +01:00
Laurent Cozic
ec499eecd5 Desktop: WYSIWYG: Added support for code blocks edition and creation 2020-04-09 17:47:12 +01:00
Laurent Cozic
7ccd19e21d Cli: Fixes #2981: Add support for retrying decryption after it has failed multiple times 2020-04-08 18:02:31 +01:00
Laurent Cozic
a6459d3641 Mobile: Fixes #2941: Fixed resource download auto mode 2020-04-08 17:40:32 +00:00
Laurent Cozic
9b26378fdd All: Fixes #2709: When modifying a conflicted note, it would disappear from the view 2020-04-07 23:06:29 +00:00
Laurent Cozic
6b8e84332d Desktop: Resolves #2639: Resource screen improvements (#2850)
Co-authored-by: Georg Grab <talkdirty@users.noreply.github.com>
2020-04-08 11:12:25 +01:00
Laurent Cozic
6d56bb8afd Revert "Mobile: Fixes #2847: Fixed text issue in config screen on some devices (#2851)"
Reverted to fix regression (crash) in iOS app.

https://github.com/laurent22/joplin/pull/2851#issuecomment-610688103

This reverts commit e024015d5e.
2020-04-08 01:38:39 +01:00
Laurent Cozic
be9e873277 Mobile: Fixes #1437: Allow scrolling past end of note 2020-04-08 01:22:18 +01:00
Laurent Cozic
10feeeeb6b All: Fixes #2257: Prevent decryption loop when a resource cannot be decrypted 2020-04-08 01:00:01 +01:00
Laurent Cozic
518af9dc0a Desktop: Resolves #2681: Clear provisional flag as soon as note is modified to avoid data loss 2020-04-06 21:10:44 +00:00
Laurent Cozic
093fc811eb All: Fixes #2604: Fixed iOS and macOS icons and created script to automate icon creation 2020-04-06 20:55:40 +00:00
Tobias Johansson
2a8b27033f Desktop: Added new Aritim-Dark theme (#2997)
* Working on an aritim-dark theme, very WIP still

* Update aritim.js

* Added new theme "Aritim-Dark"

* removing aritim-dark "brace" theme for now

* Updating style with some changes

* Reset branch back to the original upstream state, to create a different pull-request for moving all themes outside

* Reset branch back to the original upstream state

* Moved all themes out into their own .js theme files

* Updating master to use the seperated themes stuff

* Moved themes into their own const

* Removed switch case for themes and simplified it. Thanks Laurent for the help!

* Adding Aritim-Dark to theme options
2020-04-07 10:23:40 +01:00
Tobias Johansson
62bddd7c69 Desktop: Moved all themes out into their own .js theme files (#2951)
* Working on an aritim-dark theme, very WIP still

* Update aritim.js

* Added new theme "Aritim-Dark"

* removing aritim-dark "brace" theme for now

* Updating style with some changes

* Reset branch back to the original upstream state, to create a different pull-request for moving all themes outside

* Reset branch back to the original upstream state

* Moved all themes out into their own .js theme files

* Updating master to use the seperated themes stuff

* Moved themes into their own const

* Removed switch case for themes and simplified it. Thanks Laurent for the help!
2020-04-07 09:19:53 +01:00
Helmut K. C. Tessarek
113f91b3c5 Update website 2020-04-05 20:39:10 -04:00
Helmut K. C. Tessarek
d40ad2de89 Update translations 2020-04-05 20:37:15 -04:00
Kwangmyung Kim
3b7733018c All: Translation: Update ko.po (#2986)
* Translation: Update ko.po

* Update README.md

Both the words ‘한국어’ and ‘한국말’ are composed of two meaning blocks : Korean + language.

어, which can be written in the Chinese character 語, means “language”, and 말, which is a native Korean word, also means “language”. So basically 한국어 and 한국말 are the same meaning, but I’d say 한국어 is a little more formal word while 한국말 is a more colloquial word.

‘어’ can be found in many other language names, but ‘말’ is not so commonly used other than in the word ‘한국말’ or ‘우리말(uri mal - ‘our language’, which is a word that Korean people use to mean ‘Korean’).

Here are some examples:

English = 영어
Chinese = 중국어
Japanese = 일본어
Arabic = 아랍어
Spanish = 스페인어
French =  프랑스어
Latin = 라틴어
Russian = 러시아어

* change incorect word

* Revert "Update README.md"

This reverts commit 88199a40df.
2020-04-05 20:31:15 -04:00
Helmut K. C. Tessarek
e319864669 Tools: Fix Korean language name: 한국어 (#2989) 2020-04-05 21:14:31 +01:00
Ishant Gupta
7251813634 Mobile: Fixed config text input not visible in dark mode (#2910) 2020-04-05 20:47:30 +01:00
Ishant Gupta
e024015d5e Mobile: Fixes #2847: Fixed text issue in config screen on some devices (#2851)
* fixed text issue on some devices and closes #2847

* changes added to global file
2020-04-05 20:05:04 +01:00
Gen Neko
3f5e6d72d6 Fix a blank Goto Anything screen (#2983) 2020-04-05 08:55:00 +01:00
abonte
9fd43a30f9 All: Translation: Update it_IT.po (#2978) 2020-04-04 21:08:33 -04:00
Laurent Cozic
0707a0e05f Merge branch 'master' of github.com:laurent22/joplin 2020-04-04 18:31:56 +01:00
Laurent Cozic
f550d847c4 Desktop: Resolves #2688: Add "Retry All" option to synchronisation page
Based on pull request #2712 by fhfuih

commit 7d3815e51dbf682ecc1ed3544a15e51b79d5d12d
Author: Laurent Cozic <laurent@cozic.net>
Date:   Sat Apr 4 18:26:01 2020 +0100

    Fix issues

commit dad1d2c4d4eb37fdd23096a3344cf4f14498e335
Merge: 16cf0a3058 0a1ba511ea
Author: Laurent Cozic <laurent@cozic.net>
Date:   Sat Apr 4 18:09:46 2020 +0100

    Merge branch 'master' of https://github.com/fhfuih/joplin into fhfuih-master

commit 0a1ba511ea
Merge: 6207b42044 bdd760f343
Author: fhfuih <fhfuih@outlook.com>
Date:   Sat Mar 14 20:30:27 2020 -0400

    Merge branch 'master' into master

commit 6207b42044
Author: fhfuih <sam.zyhuang@outlook.com>
Date:   Sat Mar 14 20:13:28 2020 -0400

    Decryption Retry All RN frontend

commit 6f46d1985f
Author: fhfuih <sam.zyhuang@outlook.com>
Date:   Sat Mar 14 20:10:55 2020 -0400

    Decryption Retry All backend & desktop

commit 4c3d37b311
Author: fhfuih <sam.zyhuang@outlook.com>
Date:   Fri Mar 13 13:21:21 2020 -0400

    Revert "Add "retry all" option to synchronisation page"

    This reverts commit 15daaa16fd.

commit cffc919791
Author: fhfuih <sam.zyhuang@outlook.com>
Date:   Fri Mar 13 13:19:51 2020 -0400

    Revert "Refactor "retry all" renderer to avoid hacks"

    This reverts commit 51ba6ea655.

commit 51ba6ea655
Author: fhfuih <sam.zyhuang@outlook.com>
Date:   Tue Mar 10 18:27:22 2020 -0400

    Refactor "retry all" renderer to avoid hacks

commit 57d71712e1
Merge: 15daaa16fd b367955e56
Author: fhfuih <sam.zyhuang@outlook.com>
Date:   Mon Mar 9 20:42:02 2020 -0400

    Merge branch 'master' of https://github.com/fhfuih/joplin

commit 15daaa16fd
Author: fhfuih <sam.zyhuang@outlook.com>
Date:   Mon Mar 9 20:36:09 2020 -0400

    Add "retry all" option to synchronisation page
2020-04-04 18:30:13 +01:00
Siddhant Sehgal
1e9a0036e7 Desktop: Resolves #2296: Right-click to move note to notebook (#2566)
* Assign Notebook functionality added

* Made the changes acc. to laurent22

* Changes done till 9/03/20

* Removed NoteContentPropertiesDialog.js

* Render notebooks in tree hierarchy

* Update PromptDialog.jsx

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-04-04 18:03:09 +01:00
Laurent Cozic
16cf0a3058 Merge branch 'master' of github.com:laurent22/joplin 2020-04-04 17:36:29 +01:00
Helmut K. C. Tessarek
0fa19a281c fix heading 2020-04-04 03:46:23 -04:00
Mats Estensen
9c53f485e6 All: Translation: Update nb_NO.po (#2973) 2020-04-03 18:21:20 -04:00
Li
dc131f77d4 All: Translation: Update zh_CN.po (#2971) 2020-04-03 18:20:17 -04:00
Laurent Cozic
712601b8c0 Desktop: WYSIWYG: Apply theme to toolbar 2020-04-03 18:12:14 +00:00
Caleb John
ff7775b344 Desktop: Add friendly default filenames to export options (#2749)
* Add friendly default filenames to export options

* remove extension from safefilename call

* Load parent folder for all exports

* convert foldername and filename to friendly versions separatly

* Add null guards to the filename export
2020-04-03 00:24:33 +01:00
Laurent Cozic
0512fa6208 Desktop: Fixed regression when drag and dropping files 2020-04-02 23:01:14 +01:00
Laurent Cozic
27ab2b8e30 Desktop: Fixed styling issues with rendered Markdown 2020-04-02 22:54:06 +01:00
Laurent Cozic
9fa7c9c20a Desktop: WYSIWYG: Better handling of links on macOS and inside Katex block 2020-04-02 19:58:25 +01:00
Laurent Cozic
6bd0250ef8 Desktop: WYSIWYG: Handle resource download mode 2020-04-02 18:16:11 +01:00
Laurent Cozic
0d736bcb58 CLI v1.0.162 2020-04-01 18:18:41 +01:00
Laurent Cozic
c1129604ba Tools: Disable logging to console by default 2020-04-01 18:15:40 +01:00
Laurent Cozic
693f6cbfe7 Desktop: Add message box to ask confirmation when resizing image 2020-03-31 22:40:38 +01:00
Jonas
7f397a4da8 Fix Joplin_install_and_update.sh (#2913)
Make space after '"tag_name":' optional, to avoid the whole script failing without further notice.

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-03-30 18:36:10 +01:00
Siddhant Sehgal
52ba5c5bb7 Desktop: Close Goto Anything modal on outside click (#2940)
* Close goto modal on outside click

* Renamed for consistency

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-03-30 18:33:36 +01:00
Laurent Cozic
ce24942a03 Update website 2020-03-30 18:23:46 +01:00
Laurent Cozic
719afba05a Electron release v1.0.197 2020-03-30 18:03:36 +01:00
Laurent Cozic
c99dd2ba87 Tools: Fixed Electron build 2020-03-30 18:03:02 +01:00
Helmut K. C. Tessarek
a59cc94afc Update translations 2020-03-30 11:03:18 -04:00
nmiquan
336cadbc12 Translation: add Vietnamese (vi.po) (#2931)
* Vietnamese Translation

* removed cli messages

* updated translation
2020-03-30 10:59:49 -04:00
Laurent Cozic
a946dc69c1 Android release v1.0.325 2020-03-29 20:12:36 +01:00
Laurent Cozic
e2e95df057 Electron release v1.0.196 2020-03-29 20:06:44 +01:00
Laurent Cozic
e095369e1a Desktop: WYSIWYG: Prevent scripts from loading multiple times 2020-03-29 20:06:13 +01:00
Laurent Cozic
1c938a5998 Update build_troubleshooting.md 2020-03-29 11:08:53 +01:00
Anjula Karunarathne
a45128807e Desktop: Resolves #2683: Go To Anything by body (#2686)
* Go to anything by body

* Made limit parameter required

* Made parameter required

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-03-28 13:05:00 +00:00
Brandon Wulf
d54e52b1a8 Desktop: Cleaning up the install / update script (#2719)
* Cleaning up the install script

* New `--force` option always downloads the latest version
* New `--notes` option shows the release notes
* Actually print the version installed at the end
* Show download progress, but not extra garbage
* Blue logo

* refactor and cleanup

* Handle space, but no args
2020-03-27 21:58:04 -04:00
Laurent Cozic
5743729d11 Desktop: WYSIWYG: Getting links to work 2020-03-27 18:28:13 +00:00
Laurent Cozic
11d8466db1 Desktop: WYSIWYG: Getting links to work 2020-03-27 18:26:52 +00:00
Laurent Cozic
c3360d6c48 Merge branch 'master' of github.com:laurent22/joplin 2020-03-27 16:12:43 +00:00
Bart
37158fdb89 Desktop: Fixes #2334: MD importer handle special chars in linked image name (#2346)
* md importer: decode uri encoded links to cover case of special chars in linked image names

* md importer: temp debug logs for linux test pipeline

* md importer: more temp debug logs

* md importer: tests, add special char image name on linux

* md importer: tests, use const not let

* md importer: remove debug logs
2020-03-27 12:20:38 +00:00
anirudh murali
ae73051797 Desktop: Fixes #2917: Prevent title overflow on small windows (#2918) 2020-03-27 12:16:40 +00:00
Ishant Gupta
62db3d09ea Mobile: Fixes #2900: Fixed bold text not visible in dark theme (#2909)
* fixed bold text not visible in oled dark theme

* fixed variable names
2020-03-27 12:13:22 +00:00
Amit singh
f82aa0adde Mobile: Fixes #2867: Fixed styling issue in config screen (#2868)
* fixes hidden path text

* fixes hidden path text lable
2020-03-27 12:09:26 +00:00
Laurent Cozic
5e5b6cdc42 Desktop: WYSIWYG: Restored focus logic and fixed undo issue 2020-03-26 17:19:13 +00:00
Gen NK
351306eb03 Translation: Update ja_JP.po (#2914) 2020-03-26 11:55:00 -04:00
Laurent Cozic
e4fffa52d4 Doc: Updated info about unit tests and feature tests 2020-03-25 17:56:05 +00:00
Ishant Gupta
d622ff4a78 Mobile: Fixes #2843: Fixed overlapping text in Dropbox sync page (#2845) 2020-03-25 11:18:39 +00:00
Devon Zuegel
b6d4fd16c9 Mobile: Add toolbar, list continuation and Markdown preview to editor (#2224)
* The basic editor is working! No list continuation still though

* List continuation is working! Now to delete when entering again and not typing on line + handle ordered lists

* Supports checkboxes + attempted at setting font

* Editor font works now; now need to fix the delete (look at past state)

* Fix deletion problem

* Add ordered list handler

* Add comments

* Extract insertListLine

* End lists on enter for empty bullets

* Add MarkdownView (renders badly though)

* Save edited text from MarkdownEditor

* Cleanup

* Refactor react-native-markdown-editor/

* Rename react-native-markdown-editor/ => MarkdownEditor/

* Cleanup

* Fix preview styles; still need to fix checkbox problem

* Fix keyboard padding

* Change name back to #body_changeText

* Incorporate PR feedback from @laurent22

* wip: Move MarkdownEditor/ from ReactNativeClient/lib/ to ReactNativeClient/

* Move MarkdownEditor/ from ReactNativeClient/lib/ to ReactNativeClient/

* Remove log statement

* Focus TextInput in MarkdownEditor from grandparent

* Make eslint happy

* Extract textInputRefName to shared variable

* Remove accidental #setState

* Cleanup

* Cleanup

* Run linter

* Cleanup

* Update button order

* Improve styles for config descriptions

* Allow descriptions to be added to BOOL type Setting configs

* Add editorBeta Setting

* Move FailSafe details to description text

* Update descriptionText styles

* Put the editor under the beta flag toggle

* Incorporate PR feedback from @laurent22

* Refactor Markdown editor focusing

* Cleanup

* Reorder MarkdownEditor formats

* Make applyListFormat behavior more intuitive

* Add comment

* Show MarkdownEditor with preview by default

* Show preview by default, then hide on typing

* Fix MarkdownEditor selection bug

* Cleanup

* Update Markdown button styles

* Make Markdown button colors theme-conscious

* Fix merge conflict resolution mistake

* Fix broken import

* Delete package-lock.json

* Reset package-lock.json

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-03-25 10:50:45 +00:00
Sergey
a548d695f2 Doc: Update macOS troubleshooting for IOS build (#2898) 2020-03-25 09:31:05 +00:00
Aaron Murray
499f318192 Doc: Update text to match Desktop text (#2897) 2020-03-24 19:01:45 +00:00
Laurent Cozic
42ecf98344 Doc: Added build troubleshooting document 2020-03-24 17:22:44 +00:00
Caleb John
6f08e1e4ff Linux: Quit out of install script early if an ARM or 32 bit system is detected (#2881)
* Quit out of install script early if an arm system is detected

* improved error message
2020-03-24 17:08:07 +00:00
Helmut K. C. Tessarek
9524eb7e37 Update translations 2020-03-23 20:57:14 -04:00
Helmut K. C. Tessarek
84e478f8fe update de_DE.po 2020-03-23 20:56:09 -04:00
Arda Kılıçdağı
0cc77f99ac Translation: Update tr_TR.po (#2880)
* Turkish translations updated

* fullpaths updated

* Language string now respects the original one

* Line endings fixed

* Mysterious new lines cleaned

* Revert Readme

* Old translations added back
2020-03-23 20:46:59 -04:00
Ishant Gupta
622049dfad Mobile: Fixes #2859: Fixed code block styling in OLED theme (#2876) 2020-03-23 23:15:00 +00:00
Siddhant Sehgal
65bcc58261 Desktop: Fixes #2824: Fixed top margin of toolbar (#2828)
* Fixed_topmargin

* Fixed todolist hover

* Revert "Fixed todolist hover"

This reverts commit 38a4da622e.
2020-03-23 22:47:10 +00:00
Ishant Gupta
9749a2b9b7 Mobile: Resolves #2738: Auto-save after closing a note (#2782)
* latest changes merged

* fixed linting syntax
2020-03-23 22:34:13 +00:00
krzysiekwie
7b365194ba Translation: Update pl_PL.po (#2869) 2020-03-23 14:33:04 -04:00
Laurent Cozic
6e5c2730f1 Android release v1.0.324 2020-03-23 09:44:22 +00:00
Laurent Cozic
8d045f0c96 Revert "Mobile: Resolves #2286: Always show scrollbar in editor mode (#2594)"
This reverts commit 91d864bded.

To try to fix this: https://github.com/laurent22/joplin/issues/2856
2020-03-23 09:35:54 +00:00
Laurent Cozic
c370358bd1 Merge branch 'master' of github.com:laurent22/joplin 2020-03-23 01:33:12 +00:00
Laurent Cozic
03e8d921d3 Desktop: Fixed a few WISIWYG issues with checkboxes 2020-03-23 01:32:28 +00:00
Laurent Cozic
6cf624c18d Delete linkToLocal.sh 2020-03-23 00:57:33 +00:00
Laurent Cozic
41acdce165 Desktop: Added support for checkboxes and fixed various issues with WYSIWYG editor 2020-03-23 00:47:25 +00:00
Guilherme Teixeira
c607444c23 Translation: Update pt_BR.po (#2846) 2020-03-22 20:09:14 -04:00
Sergey
940198b9a0 Translation: Update ru_RU.po (#2839) 2020-03-22 20:08:03 -04:00
Laurent Cozic
9c3cf705c6 Update website 2020-03-22 22:24:37 +00:00
Laurent Cozic
6027725fae ios-v10.0.46 2020-03-22 20:07:49 +00:00
Laurent Cozic
054aa52bc8 Android release v1.0.323 2020-03-22 19:50:02 +00:00
345 changed files with 38323 additions and 14972 deletions

View File

@@ -21,38 +21,41 @@ Clipper/content_scripts/Readability.js
Clipper/dist
Clipper/icons
Clipper/popup/build
Clipper/popup/config/webpack.config.js
Clipper/popup/node_modules
Clipper/popup/scripts/build.js
docs/
ElectronClient/dist
ElectronClient/gui/editors/TinyMCE/plugins/lists.js
ElectronClient/lib
ElectronClient/lib/vendor/sjcl-rn.js
ElectronClient/lib/vendor/sjcl.js
ElectronClient/locales
ElectronClient/node_modules
ElectronClient/packageInfo.js
highlight.pack.js
Modules/TinyMCE/JoplinLists/
node_modules/
ReactNativeClient/android
ReactNativeClient/ios
ReactNativeClient/lib/joplin-renderer/assets/
ReactNativeClient/lib/joplin-renderer/vendor/fountain.min.js
ReactNativeClient/lib/rnInjectedJs/
ReactNativeClient/lib/vendor/
ReactNativeClient/lib/welcomeAssets.js
ReactNativeClient/locales
ReactNativeClient/node_modules
ReactNativeClient/pluginAssets/
readme/
Tools/node_modules
Tools/PortableAppsLauncher
Server/.git/
Server/.github/
Server/docs/
Server/dist/
Server/bin/
Server/dist/
Server/docs/
Server/node_modules/
ElectronClient/packageInfo.js
ReactNativeClient/pluginAssets/
ReactNativeClient/lib/joplin-renderer/vendor/fountain.min.js
ReactNativeClient/lib/joplin-renderer/assets/
ReactNativeClient/lib/rnInjectedJs/
Clipper/popup/config/webpack.config.js
Clipper/popup/scripts/build.js
Tools/node_modules
Tools/PortableAppsLauncher
Modules/TinyMCE/IconPack/postinstall.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/gui/editors/PlainEditor.js
@@ -64,6 +67,7 @@ ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ElectronClient/gui/utils/NoteText.js
ReactNativeClient/lib/AsyncActionQueue.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/checkbox.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fence.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js

1
.gitignore vendored
View File

@@ -59,6 +59,7 @@ ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ElectronClient/gui/utils/NoteText.js
ReactNativeClient/lib/AsyncActionQueue.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/checkbox.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fence.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -22,19 +22,6 @@ Then you can test the various applications:
cd ElectronClient
npm start
If you'd like to auto-reload the app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
```sh
cd ElectronClient
watchman-make -p '**/*.js' '**/*.jsx' --run "npm start"
```
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
1. Edit and save files in your text editor.
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
## Testing the Terminal application
cd CliClient
@@ -52,7 +39,7 @@ Then:
To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
Normally the bundler should start automatically with the application. If it doesn't run `npm start`.
Normally the bundler should start automatically with the application. If it doesn't, run `npm start`.
## Building the clipper
@@ -80,37 +67,21 @@ You can specify additional parameters when running the desktop or CLI applicatio
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
# Troubleshooting desktop application
## Hot reload
## On Linux and macOS
If you'd like to auto-reload the desktop app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
If there's an error `while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory`, run `sudo apt-get install libgconf-2-4`
```sh
cd ElectronClient
watchman-make -p '**/*.js' '**/*.jsx' --run "npm start"
```
If you get a node-gyp related error, you might need to manually install it: `npm install -g node-gyp`.
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
If you get the error `libtool: unrecognized option '-static'`, follow the instructions [in this post](https://stackoverflow.com/a/38552393/561309) to use the correct libtool version.
1. Edit and save files in your text editor.
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
## On Windows
# Troubleshooting
If node-gyp does not work (MSBUILD: error MSB3428: Could not load the Visual C++ component "VCBuild.exe"), you might need to install `windows-build-tools` using `npm install --global windows-build-tools`.
If `yarn dist` fails, it may need administrative rights.
If you get an `error MSB8020: The build tools for v140 cannot be found.` try to run with a different toolset version, eg `npm install --toolset=v141` (See [here](https://github.com/mapbox/node-sqlite3/issues/1124) for more info).
## Other issues
> The application window doesn't open or is white
This is an indication that there's an early initialisation error. Try this:
- In ElectronAppWrapper, set `debugEarlyBugs` to `true`. This will force the window to show up and should open the console next to it, which should display any error.
- In more rare cases, an already open instance of Joplin can create strange low-level bugs that will display no error but will result in this white window. A non-dev instance of Joplin, or a dev instance that wasn't properly closed might cause this. So make sure you close everything and try again. Perhaps even other Electron apps running (Skype, Slack, etc.) could cause this?
- Also try to delete node_modules and rebuild.
- If all else fails, switch your computer off and on again, to make sure you start clean.
> How to work on the app from Windows?
**You should not use WSL at all** because this is a GUI app that lives outside of WSL, and the WSL layer can cause all kind of very hard to debug issues. It can also lock files in node_modules that cannot be unlocked when the app crashes. (You need to restart your computer.) Likewise, don't run the TypeScript watch command from WSL.
So everything should be done from a Windows Command prompt or Windows PowerShell running as Administrator. All build and start commands are designed to work cross-platform, including on Windows.
Please read for the [Build Troubleshooting Document](https://github.com/laurent22/joplin/blob/master/readme/build_troubleshooting.md) for various tips on how to get the build working.

View File

@@ -23,13 +23,11 @@ Avoid listing multiple requests in one topic. One topic per request makes it eas
Finally, when submitting a pull request, don't forget to [test your code](#unit-tests).
# Contribute to the project
## Contributing to Joplin's translation
# Contributing to Joplin's translation
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://joplinapp.org/#localisation).
## Contributing to Joplin's code
# Contributing to Joplin's code
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
@@ -41,7 +39,7 @@ If you want to start contributing to the project's code, please follow these gui
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.
### Coding style
## Coding style
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `npm install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `npm install` at the root of the repository.
@@ -49,44 +47,45 @@ For new React components, please use [React Hooks](https://reactjs.org/docs/hook
For changes made to the Desktop client that affect the user interface, refer to `ElectronClient/app/theme.js` for all styling information. The goal is to create a consistent user interface to allow for easy navigation of Joplin's various features and improve the overall user experience.
### Unit tests
## Automated tests
When submitting a pull request for a new feature or bug fix, please add unit tests for your code. Unit testing GUI changes is not always possible so it is not required, but any change in a file under /lib for example should be unit tested.
When submitting a pull request for a new feature or bug fixes, please add automated tests for your code whenever possible. Tests in Joplin are divided in **unit tests** and **feature tests**.
* **Unit tests** are used to tests models, services or utility classes - they are relatively low level. Unit tests should be prefixed with the type of class that is being tested - for example "models_Folder" or "services_SearchEngine".
* **Feature tests** on the other hand are to test higher level functionalities such as interactions with the GUI and how they affect the underlying model. Often these tests would dispatch Redux actions, and inspect how the application state has been changed. The feature tests should be prefixed with "feature_", for example "feature_TagList". There's a good explanation on what qualifies as a feature test in [this post](https://github.com/laurent22/joplin/pull/2819#issuecomment-603502230).
The tests are under CliClient/tests. To get them running, you first need to build the CLI app:
```sh
npm run tsc # Build the .ts and .tsx files
cd CliClient
npm install
cd CliClient
```
To run all the test units:
```sh
npm run test
npm test
```
To run just one particular file:
```sh
npm run test -- --filter=markdownUtils # Don't add the .js extension
npm test -- --filter=markdownUtils # Don't add the .js extension
```
To filter tests. For example, to run all the test units that contain "should handle conflict" in their description:
```sh
npm run test -- --filter="should handle conflict"
npm test -- --filter="should handle conflict"
```
If you get the error `Cannot find module '/joplin/CliClient/node_modules/sqlite3/lib/binding/node-v79-darwin-x64/node_sqlite3.node'`, you may need to run `npm rebuild`.
## About abandoned pull requests
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we dont hear from them again.
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don't hear from them again.
In that case we will not merge the pull request, even if only small changes are missing. Our policy is simply to close the pull request. Why? Because an unfinished pull request essentially means giving us work and moving on. We would rather not encourage this behaviour.
Also, please note that since we have spent time reviewing the pull request and proposing solutions, we reserve the right to re-use that knowledge to create a new pull request, potentially based on your changes.
Wed much prefer that you complete the pull request though, so well be sure to ping you a few times before that!
We'd much prefer that you complete the pull request though, so we'll be sure to ping you a few times before that!

View File

@@ -24,12 +24,11 @@ class Command extends BaseCommand {
['-p, --password <password>', 'Use this password as master password (For security reasons, it is not recommended to use this option).'],
['-v, --verbose', 'More verbose output for the `target-status` command'],
['-o, --output <directory>', 'Output directory'],
['--retry-failed-items', 'Applies to `decrypt` command - retries decrypting items that previously could not be decrypted.'],
];
}
async action(args) {
// change-password
const options = args.options;
const askForMasterKey = async error => {
@@ -44,6 +43,27 @@ class Command extends BaseCommand {
return true;
};
const startDecryption = async () => {
this.stdout(_('Starting decryption... Please wait as it may take several minutes depending on how much there is to decrypt.'));
while (true) {
try {
await DecryptionWorker.instance().start();
break;
} catch (error) {
if (error.code === 'masterKeyNotLoaded') {
const ok = await askForMasterKey(error);
if (!ok) return;
continue;
}
throw error;
}
}
this.stdout(_('Completed decryption.'));
};
if (args.command === 'enable') {
const password = options.password ? options.password.toString() : await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
if (!password) {
@@ -73,24 +93,8 @@ class Command extends BaseCommand {
const plainText = await EncryptionService.instance().decryptString(args.path);
this.stdout(plainText);
} else {
this.stdout(_('Starting decryption... Please wait as it may take several minutes depending on how much there is to decrypt.'));
while (true) {
try {
await DecryptionWorker.instance().start();
break;
} catch (error) {
if (error.code === 'masterKeyNotLoaded') {
const ok = await askForMasterKey(error);
if (!ok) return;
continue;
}
throw error;
}
}
this.stdout(_('Completed decryption.'));
if (args.options['retry-failed-items']) await DecryptionWorker.instance().clearDisabledItems();
await startDecryption();
}
return;

View File

@@ -25,19 +25,28 @@ class Command extends BaseCommand {
this.stdout(`# ${section.title}`);
this.stdout('');
let canRetryType = '';
for (const n in section.body) {
if (!section.body.hasOwnProperty(n)) continue;
const line = section.body[n];
this.stdout(line);
const item = section.body[n];
if (typeof item === 'object') {
canRetryType = item.canRetryType;
this.stdout(item.text);
} else {
this.stdout(item);
}
}
if (canRetryType === 'e2ee') {
this.stdout('');
this.stdout(_('To retry decryption of these items. Run `e2ee decrypt --retry-failed-items`'));
}
}
app()
.gui()
.showConsole();
app()
.gui()
.maximizeConsole();
app().gui().showConsole();
app().gui().maximizeConsole();
}
}

View File

@@ -46,6 +46,8 @@ class NoteWidget extends TextWidget {
if (this.note_ && this.note_.encryption_applied) {
this.text = _('One or more items are currently encrypted and you may need to supply a master password. To do so please type `e2ee decrypt`. If you have already supplied the password, the encrypted items are being decrypted in the background and will be available soon.');
this.text += '\n\n';
this.text += _('You may also type `status` for more information.');
} else {
this.text = this.note_ ? `${this.note_.title}\n\n${this.note_.body}` : '';
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -34,42 +34,44 @@ locales['sr_RS'] = require('./sr_RS.json');
locales['sv'] = require('./sv.json');
locales['th_TH'] = require('./th_TH.json');
locales['tr_TR'] = require('./tr_TR.json');
locales['vi'] = require('./vi.json');
locales['zh_CN'] = require('./zh_CN.json');
locales['zh_TW'] = require('./zh_TW.json');
stats['ar'] = {"percentDone":89};
stats['eu'] = {"percentDone":38};
stats['bs_BA'] = {"percentDone":83};
stats['eu'] = {"percentDone":37};
stats['bs_BA'] = {"percentDone":82};
stats['bg_BG'] = {"percentDone":74};
stats['ca'] = {"percentDone":59};
stats['ca'] = {"percentDone":58};
stats['hr_HR'] = {"percentDone":31};
stats['cs_CZ'] = {"percentDone":92};
stats['da_DK'] = {"percentDone":83};
stats['de_DE'] = {"percentDone":97};
stats['et_EE'] = {"percentDone":74};
stats['cs_CZ'] = {"percentDone":91};
stats['da_DK'] = {"percentDone":82};
stats['de_DE'] = {"percentDone":99};
stats['et_EE'] = {"percentDone":73};
stats['en_GB'] = {"percentDone":100};
stats['en_US'] = {"percentDone":100};
stats['es_ES'] = {"percentDone":92};
stats['es_ES'] = {"percentDone":91};
stats['eo'] = {"percentDone":42};
stats['fr_FR'] = {"percentDone":93};
stats['fr_FR'] = {"percentDone":92};
stats['gl_ES'] = {"percentDone":48};
stats['it_IT'] = {"percentDone":96};
stats['it_IT'] = {"percentDone":97};
stats['nl_NL'] = {"percentDone":94};
stats['nl_BE'] = {"percentDone":38};
stats['nl_NL'] = {"percentDone":95};
stats['nb_NO'] = {"percentDone":87};
stats['fa'] = {"percentDone":37};
stats['pl_PL'] = {"percentDone":73};
stats['pt_PT'] = {"percentDone":88};
stats['pt_BR'] = {"percentDone":85};
stats['nb_NO'] = {"percentDone":99};
stats['fa'] = {"percentDone":36};
stats['pl_PL'] = {"percentDone":85};
stats['pt_PT'] = {"percentDone":87};
stats['pt_BR'] = {"percentDone":89};
stats['ro'] = {"percentDone":38};
stats['sl_SI'] = {"percentDone":48};
stats['sv'] = {"percentDone":66};
stats['sl_SI'] = {"percentDone":47};
stats['sv'] = {"percentDone":65};
stats['th_TH'] = {"percentDone":59};
stats['tr_TR'] = {"percentDone":89};
stats['el_GR'] = {"percentDone":91};
stats['ru_RU'] = {"percentDone":93};
stats['vi'] = {"percentDone":95};
stats['tr_TR'] = {"percentDone":98};
stats['el_GR'] = {"percentDone":90};
stats['ru_RU'] = {"percentDone":98};
stats['sr_RS'] = {"percentDone":80};
stats['zh_CN'] = {"percentDone":95};
stats['zh_TW'] = {"percentDone":89};
stats['ja_JP'] = {"percentDone":97};
stats['ko'] = {"percentDone":95};
stats['zh_CN'] = {"percentDone":98};
stats['zh_TW'] = {"percentDone":88};
stats['ja_JP'] = {"percentDone":99};
stats['ko'] = {"percentDone":96};
module.exports = { locales: locales, stats: stats };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3409
CliClient/locales/vi.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "joplin",
"version": "1.0.161",
"version": "1.0.162",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -33,9 +33,9 @@
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"acorn": {
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz",
"integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw=="
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg=="
},
"acorn-globals": {
"version": "4.3.4",
@@ -47,9 +47,9 @@
},
"dependencies": {
"acorn": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
"integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw=="
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
"integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA=="
}
}
},
@@ -344,11 +344,6 @@
"integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
"dev": true
},
"async-limiter": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
},
"async-mutex": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.1.3.tgz",
@@ -574,9 +569,9 @@
}
},
"browser-process-hrtime": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz",
"integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw=="
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
"integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
},
"buffer-equal": {
"version": "1.0.0",
@@ -1161,16 +1156,23 @@
}
},
"cssom": {
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
"integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz",
"integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw=="
},
"cssstyle": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz",
"integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.2.0.tgz",
"integrity": "sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA==",
"requires": {
"cssom": "0.3.x"
"cssom": "~0.3.6"
},
"dependencies": {
"cssom": {
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
"integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
}
}
},
"cwise-compiler": {
@@ -1207,18 +1209,6 @@
"abab": "^2.0.0",
"whatwg-mimetype": "^2.2.0",
"whatwg-url": "^7.0.0"
},
"dependencies": {
"whatwg-url": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz",
"integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==",
"requires": {
"lodash.sortby": "^4.7.0",
"tr46": "^1.0.1",
"webidl-conversions": "^4.0.2"
}
}
}
},
"debug": {
@@ -2121,7 +2111,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -2142,12 +2133,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2162,17 +2155,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -2289,7 +2285,8 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -2301,6 +2298,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -2315,6 +2313,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -2322,12 +2321,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -2346,6 +2347,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -2435,7 +2437,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -2447,6 +2450,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -2532,7 +2536,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -2568,6 +2573,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -2587,6 +2593,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2630,12 +2637,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -3448,6 +3457,11 @@
"resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz",
"integrity": "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc="
},
"ip-regex": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk="
},
"is-absolute": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz",
@@ -3735,13 +3749,13 @@
"dev": true
},
"joplin-turndown": {
"version": "4.0.23",
"resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.23.tgz",
"integrity": "sha512-Dh93R7G/S/KRbOu4/+FIxoUcUDcoUL4QDsqGhperOi/cUxUeg8fngrmEzdP8kEpQzqm5+8jkq9Cc1w6695owpQ==",
"version": "4.0.27",
"resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.27.tgz",
"integrity": "sha512-qwJEzpbsyXnfjYgCVXWbuf3BdbDAaP7edm5ubeVAaQ3RnaiSEB2xZLg3lubmuFOIxXnkMDMkGJC4G+qAbCW95w==",
"requires": {
"css": "^2.2.4",
"html-entities": "^1.2.1",
"jsdom": "^11.9.0"
"jsdom": "^15.2.1"
}
},
"joplin-turndown-plugin-gfm": {
@@ -3766,35 +3780,35 @@
"optional": true
},
"jsdom": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz",
"integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==",
"version": "15.2.1",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.2.1.tgz",
"integrity": "sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g==",
"requires": {
"abab": "^2.0.0",
"acorn": "^5.5.3",
"acorn-globals": "^4.1.0",
"acorn": "^7.1.0",
"acorn-globals": "^4.3.2",
"array-equal": "^1.0.0",
"cssom": ">= 0.3.2 < 0.4.0",
"cssstyle": "^1.0.0",
"data-urls": "^1.0.0",
"cssom": "^0.4.1",
"cssstyle": "^2.0.0",
"data-urls": "^1.1.0",
"domexception": "^1.0.1",
"escodegen": "^1.9.1",
"escodegen": "^1.11.1",
"html-encoding-sniffer": "^1.0.2",
"left-pad": "^1.3.0",
"nwsapi": "^2.0.7",
"parse5": "4.0.0",
"nwsapi": "^2.2.0",
"parse5": "5.1.0",
"pn": "^1.1.0",
"request": "^2.87.0",
"request-promise-native": "^1.0.5",
"sax": "^1.2.4",
"request": "^2.88.0",
"request-promise-native": "^1.0.7",
"saxes": "^3.1.9",
"symbol-tree": "^3.2.2",
"tough-cookie": "^2.3.4",
"tough-cookie": "^3.0.1",
"w3c-hr-time": "^1.0.1",
"w3c-xmlserializer": "^1.1.2",
"webidl-conversions": "^4.0.2",
"whatwg-encoding": "^1.0.3",
"whatwg-mimetype": "^2.1.0",
"whatwg-url": "^6.4.1",
"ws": "^5.2.0",
"whatwg-encoding": "^1.0.5",
"whatwg-mimetype": "^2.3.0",
"whatwg-url": "^7.0.0",
"ws": "^7.0.0",
"xml-name-validator": "^3.0.0"
}
},
@@ -3935,11 +3949,6 @@
"flush-write-stream": "^1.0.2"
}
},
"left-pad": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA=="
},
"levenshtein": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/levenshtein/-/levenshtein-1.0.5.tgz",
@@ -4999,9 +5008,9 @@
"dev": true
},
"parse5": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
"integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA=="
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
"integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ=="
},
"pascalcase": {
"version": "0.1.1",
@@ -5693,6 +5702,22 @@
"request-promise-core": "1.1.3",
"stealthy-require": "^1.1.1",
"tough-cookie": "^2.3.3"
},
"dependencies": {
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
}
}
},
"require-directory": {
@@ -5786,6 +5811,14 @@
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"saxes": {
"version": "3.1.11",
"resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.11.tgz",
"integrity": "sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==",
"requires": {
"xmlchars": "^2.1.1"
}
},
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
@@ -6576,7 +6609,7 @@
"requires": {
"chalk": "^2.1.0",
"emphasize": "^1.5.0",
"node-emoji": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",
"node-emoji": "git+https://github.com/laurent22/node-emoji.git",
"slice-ansi": "^1.0.0",
"string-width": "^2.1.1",
"terminal-kit": "^1.13.11",
@@ -6699,10 +6732,11 @@
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
"integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==",
"requires": {
"ip-regex": "^2.1.0",
"psl": "^1.1.28",
"punycode": "^2.1.1"
},
@@ -7118,11 +7152,21 @@
}
},
"w3c-hr-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz",
"integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
"integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
"requires": {
"browser-process-hrtime": "^0.1.2"
"browser-process-hrtime": "^1.0.0"
}
},
"w3c-xmlserializer": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz",
"integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==",
"requires": {
"domexception": "^1.0.1",
"webidl-conversions": "^4.0.2",
"xml-name-validator": "^3.0.0"
}
},
"webidl-conversions": {
@@ -7154,9 +7198,9 @@
"integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g=="
},
"whatwg-url": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz",
"integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz",
"integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==",
"requires": {
"lodash.sortby": "^4.7.0",
"tr46": "^1.0.1",
@@ -7237,12 +7281,9 @@
}
},
"ws": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
"integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==",
"requires": {
"async-limiter": "~1.0.0"
}
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz",
"integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ=="
},
"xdg-basedir": {
"version": "3.0.0",
@@ -7268,6 +7309,11 @@
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz",
"integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8="
},
"xmlchars": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
},
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",

View File

@@ -7,7 +7,7 @@
"test": "gulp buildTests -L && jasmine --config=tests/support/jasmine.json",
"postinstall": "npm run build && patch-package --patch-dir ../patches",
"build": "gulp build",
"start": "gulp build -L && node 'build/main.js' --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev"
"start": "gulp build -L && node 'build/main.js' --stack-trace-enabled --log-level debug --env dev"
},
"bugs": {
"url": "https://github.com/laurent22/joplin/issues"
@@ -27,7 +27,7 @@
],
"owner": "Laurent Cozic"
},
"version": "1.0.161",
"version": "1.0.162",
"bin": {
"joplin": "./main.js"
},
@@ -55,7 +55,7 @@
"htmlparser2": "^4.1.0",
"image-data-uri": "^2.0.0",
"image-type": "^3.0.0",
"joplin-turndown": "^4.0.23",
"joplin-turndown": "^4.0.27",
"joplin-turndown-plugin-gfm": "^1.0.12",
"json-stringify-safe": "^5.0.1",
"jssha": "^2.3.0",

View File

@@ -49,4 +49,41 @@ describe('ArrayUtils', function() {
expect(ArrayUtils.contentEquals(['b'], ['a', 'b'])).toBe(false);
}));
it('should merge overlapping intervals', asyncTest(async () => {
const testCases = [
[
[],
[],
],
[
[[0, 50]],
[[0, 50]],
],
[
[[0, 20], [20, 30]],
[[0, 30]],
],
[
[[0, 10], [10, 50], [15, 30], [20, 80], [80, 95]],
[[0, 95]],
],
[
[[0, 5], [0, 10], [25, 35], [30, 60], [50, 60], [85, 100]],
[[0, 10], [25, 60], [85, 100]],
],
[
[[0, 5], [10, 40], [35, 50], [35, 75], [50, 60], [80, 85], [80, 90]],
[[0, 5], [10, 75], [80, 90]],
],
];
testCases.forEach((t, i) => {
const intervals = t[0];
const expected = t[1];
const actual = ArrayUtils.mergeOverlappingIntervals(intervals, intervals.length);
expect(actual).toEqual(expected, `Test case ${i}`);
});
}));
});

View File

@@ -12,6 +12,7 @@ const BaseModel = require('lib/BaseModel.js');
const { shim } = require('lib/shim');
const MdToHtml = require('lib/joplin-renderer/MdToHtml');
const { enexXmlToMd } = require('lib/import-enex-md-gen.js');
const { themeStyle } = require('../../ElectronClient/theme.js');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60 * 60 * 1000; // Can run for a while since everything is in the same test unit
@@ -19,6 +20,18 @@ process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
function newTestMdToHtml(options = null) {
options = {
ResourceModel: {
isResourceUrl: () => false,
},
fsDriver: shim.fsDriver(),
...options,
};
return new MdToHtml(options);
}
describe('MdToHtml', function() {
beforeEach(async (done) => {
@@ -30,11 +43,7 @@ describe('MdToHtml', function() {
it('should convert from Markdown to Html', asyncTest(async () => {
const basePath = `${__dirname}/md_to_html`;
const files = await shim.fsDriver().readDirStats(basePath);
const mdToHtml = new MdToHtml({
ResourceModel: {
isResourceUrl: () => false,
},
});
const mdToHtml = newTestMdToHtml();
for (let i = 0; i < files.length; i++) {
const mdFilename = files[i].path;
@@ -49,6 +58,14 @@ describe('MdToHtml', function() {
bodyOnly: true,
};
if (mdFilename === 'checkbox_alternative.md') {
mdToHtmlOptions.plugins = {
checkbox: {
renderingType: 2,
},
};
}
const markdown = await shim.fsDriver().readFile(mdFilePath);
let expectedHtml = await shim.fsDriver().readFile(htmlPath);
@@ -80,12 +97,61 @@ describe('MdToHtml', function() {
}
}));
// it('should write CSS to an external file', asyncTest(async () => {
// const mdToHtml = new MdToHtml({
// fsDriver: shim.fsDriver(),
// tempDir: Setting.value('tempDir'),
// });
it('should return enabled plugin assets', asyncTest(async () => {
const pluginOptions = {};
const pluginNames = MdToHtml.pluginNames();
for (const n of pluginNames) pluginOptions[n] = { enabled: false };
{
const mdToHtml = newTestMdToHtml({ pluginOptions: pluginOptions });
const assets = await mdToHtml.allAssets(themeStyle(1));
expect(assets.length).toBe(1); // Base note style should always be returned
}
{
pluginOptions['checkbox'].enabled = true;
const mdToHtml = newTestMdToHtml({ pluginOptions: pluginOptions });
const assets = await mdToHtml.allAssets(themeStyle(1));
expect(assets.length).toBe(2);
expect(assets[1].mime).toBe('text/css');
const content = await shim.fsDriver().readFile(assets[1].path);
expect(content.indexOf('joplin-checklist') >= 0).toBe(true);
}
}));
it('should wrapped the rendered Markdown', asyncTest(async () => {
const mdToHtml = newTestMdToHtml();
// In this case, the HTML contains both the style and
// the rendered markdown wrapped in a DIV.
const result = await mdToHtml.render('just **testing**');
expect(result.cssStrings.length).toBe(0);
expect(result.html.indexOf('rendered-md') >= 0).toBe(true);
}));
it('should return the rendered body only', asyncTest(async () => {
const mdToHtml = newTestMdToHtml();
// In this case, the HTML contains only the rendered markdown,
// with no wrapper and no style.
// The style is instead in the cssStrings property.
const result = await mdToHtml.render('just **testing**', null, { bodyOnly: true });
expect(result.cssStrings.length).toBe(1);
expect(result.html.trim()).toBe('<p>just <strong>testing</strong></p>');
}));
it('should split HTML and CSS', asyncTest(async () => {
const mdToHtml = newTestMdToHtml();
// It is similar to the bodyOnly option, excepts that
// the rendered Markdown is wrapped in a DIV
const result = await mdToHtml.render('just **testing**', null, { splitted: true });
expect(result.cssStrings.length).toBe(1);
expect(result.html.trim()).toBe('<div id="rendered-md"><p>just <strong>testing</strong></p>\n</div>');
}));
// }));
});

View File

@@ -38,4 +38,9 @@ describe('InteropService_Importer_Md: importLocalImages', function() {
expect(items.length).toBe(0);
expect(note.body).toContain('Unidentified vessel travelling at sub warp speed, bearing 235.7. Fluctuations in energy readings from it, Captain. All transporters off.');
});
it('should import linked image with special characters in name', async function() {
const note = await importer.importFile(`${__dirname}/md_to_md/sample-special-chars.md`, 'notebook');
const items = await Note.linkedItems(note.body);
expect(items.length).toBe(1);
});
});

View File

@@ -41,4 +41,23 @@ describe('StringUtils', function() {
}
}));
it('should find the next whitespace character', asyncTest(async () => {
const testCases = [
['', [[0, 0]]],
['Joplin', [[0, 6], [3, 6], [6, 6]]],
['Joplin is a free, open source\n note taking and *to-do* application', [[0, 6], [12, 17], [23, 29], [48, 54]]],
];
testCases.forEach((t, i) => {
const str = t[0];
t[1].forEach((pair, j) => {
const begin = pair[0];
const expected = pair[1];
const actual = StringUtils.nextWhitespaceIndex(str, begin);
expect(actual).toBe(expected, `Test string ${i} - case ${j}`);
});
});
}));
});

View File

@@ -0,0 +1,52 @@
/* eslint-disable no-unused-vars */
require('app-module-path').addPath(__dirname);
const { setupDatabaseAndSynchronizer, switchClient, asyncTest, createNTestFolders, createNTestNotes, createNTestTags, TestApp } = require('test-utils.js');
const Setting = require('lib/models/Setting.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Tag = require('lib/models/Tag.js');
const { time } = require('lib/time-utils.js');
let testApp = null;
describe('integration_NoteList', function() {
beforeEach(async (done) => {
testApp = new TestApp();
await testApp.start(['--no-welcome']);
done();
});
afterEach(async (done) => {
if (testApp !== null) await testApp.destroy();
testApp = null;
done();
});
// Reference: https://github.com/laurent22/joplin/issues/2709
it('should leave a conflict note in the conflict folder when it modified', asyncTest(async () => {
const folder = await Folder.save({ title: 'test' });
const note = await Note.save({ title: 'note 1', parent_id: folder.id, is_conflict: 1 });
await testApp.wait();
testApp.dispatch({ type: 'FOLDER_SELECT', id: Folder.conflictFolderId() });
await testApp.wait();
testApp.dispatch({ type: 'NOTE_SELECT', id: note.id });
await testApp.wait();
// Check that the conflict folder is selected and that the conflict note is inside
let state = testApp.store().getState();
expect(state.selectedFolderId).toBe(Folder.conflictFolderId());
expect(state.selectedNoteIds[0]).toBe(note.id);
await Note.save({ id: note.id, title: 'note 1 mod', is_conflict: 1 });
await testApp.wait();
// Check that the conflict folder is still selected with the note still inside
state = testApp.store().getState();
expect(state.selectedFolderId).toBe(Folder.conflictFolderId());
expect(state.selectedNoteIds[0]).toBe(note.id);
}));
});

View File

@@ -0,0 +1,6 @@
<p>Line 1</p>
<div class="jop-noMdConv">Line 2</div>
<div class="jop-noMdConv"><span class="jop-noMdConv">Line</span> 4</div>
<div><span>Line</span> 5</div>
<p>Line 6</p>
<div class="jop-noMdConv">Markdown <strong>inside</strong></div>

View File

@@ -0,0 +1,9 @@
Line 1
<div>Line 2</div><div><span>Line</span> 4</div>
Line 5
Line 6
<div>Markdown **inside**</div>

View File

@@ -1,53 +0,0 @@
<ul>
<li class="md-checkbox joplin-checkbox"><div class="checkbox-wrapper"><input type="checkbox" id="md-checkbox-7" onclick="
try {
if (this.checked) {
this.setAttribute('checked', 'checked');
} else {
this.removeAttribute('checked');
}
ipcProxySendToHost('checkboxclick:checked:0');
const label = document.getElementById(&quot;cb-label-md-checkbox-7&quot;);
label.classList.remove(this.checked ? 'checkbox-label-unchecked' : 'checkbox-label-checked');
label.classList.add(this.checked ? 'checkbox-label-checked' : 'checkbox-label-unchecked');
} catch (error) {
console.warn('Checkbox checked:0 error', error);
}
return true;
" checked="checked"><label id="cb-label-md-checkbox-7" for="md-checkbox-7" class="checkbox-label-checked">one</label></div></li>
<li class="md-checkbox joplin-checkbox"><div class="checkbox-wrapper"><input type="checkbox" id="md-checkbox-8" onclick="
try {
if (this.checked) {
this.setAttribute('checked', 'checked');
} else {
this.removeAttribute('checked');
}
ipcProxySendToHost('checkboxclick:unchecked:1');
const label = document.getElementById(&quot;cb-label-md-checkbox-8&quot;);
label.classList.remove(this.checked ? 'checkbox-label-unchecked' : 'checkbox-label-checked');
label.classList.add(this.checked ? 'checkbox-label-checked' : 'checkbox-label-unchecked');
} catch (error) {
console.warn('Checkbox unchecked:1 error', error);
}
return true;
"><label id="cb-label-md-checkbox-8" for="md-checkbox-8" class="checkbox-label-unchecked">two</label></div></li>
<li class="md-checkbox joplin-checkbox"><div class="checkbox-wrapper"><input type="checkbox" id="md-checkbox-9" onclick="
try {
if (this.checked) {
this.setAttribute('checked', 'checked');
} else {
this.removeAttribute('checked');
}
ipcProxySendToHost('checkboxclick:unchecked:2');
const label = document.getElementById(&quot;cb-label-md-checkbox-9&quot;);
label.classList.remove(this.checked ? 'checkbox-label-unchecked' : 'checkbox-label-checked');
label.classList.add(this.checked ? 'checkbox-label-checked' : 'checkbox-label-unchecked');
} catch (error) {
console.warn('Checkbox unchecked:2 error', error);
}
return true;
"><label id="cb-label-md-checkbox-9" for="md-checkbox-9" class="checkbox-label-unchecked">with <strong>bold</strong> text</label></div></li>
</ul>

View File

@@ -1,3 +0,0 @@
- [x] one
- [ ] two
- [ ] with **bold** text

View File

@@ -0,0 +1,9 @@
<ul class="joplin-checklist">
<li>Not checked</li>
<li class="checked">Checked!!
<ul class="joplin-checklist">
<li class="checked">Indented, with <strong>bold</strong></li>
<li>Indented, not checked</li>
</ul>
</li>
</ul>

View File

@@ -0,0 +1,4 @@
- [ ] Not checked
- [x] Checked!!
- [x] Indented, with **bold**
- [ ] Indented, not checked

View File

@@ -1,4 +1,4 @@
_Block formulas_ are surrounded by double dollar signs. For example, `$$x = \frac{-b \pm \sqrt{b^2 - 4ac} }{2a}$$` renders, _on a separate line_, as
*Block formulas* are surrounded by double dollar signs. For example, `$$x = \frac{-b \pm \sqrt{b^2 - 4ac} }{2a}$$` renders, *on a separate line*, as
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac} }{2a}.

View File

@@ -1 +1 @@
_Inline formulas_ are surrounded by single dollar signs. For example, `$f(x) = ax^2 + bx + c$` renders as $f(x)=ax^2+bx+c$.
*Inline formulas* are surrounded by single dollar signs. For example, `$f(x) = ax^2 + bx + c$` renders as $f(x)=ax^2+bx+c$.

View File

@@ -0,0 +1,9 @@
<ul class="joplin-checklist">
<li>Not checked</li>
<li class="checked">Checked!!
<ul class="joplin-checklist">
<li class="checked">Indented, with <strong>bold</strong></li>
<li>Indented, not checked</li>
</ul>
</li>
</ul>

Some files were not shown because too many files have changed in this diff Show More