1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-05 17:46:19 +00:00
Commit Graph

758 Commits

Author SHA1 Message Date
RJ Skerry-Ryan
8d9dc0cd29
Markdown: Don't emit paragraph tags when a paragraph is "tight". (#5848)
* markdown: Don't emit paragraph tags when a paragraph is "tight".

Motivation: Since the upgrade to remarkable.js (#3876), lists are rendered as
HTML like this:

```
<ul>
  <li><p>One</p></li>
  <li><p>Two</p></li>
  <li><p>Three</p></li>
</ul>
```

The paragraph nodes insert blocks that break the visual flow of the list and are
unexpected e.g. compared to WikiText markup's rendering of a bulleted list.

Solution: remarkable.js annotates certain paragraph nodes as "tight", and in the
bulleted list case, the paragraph nodes wrapping the text of each list item are
marked tight.

remarkable uses the tight property to [elide paragraph tags in its
renderer](58b6945f20/lib/rules.js (L136-L142)).

This change implements the equivalent logic in TiddlyWiki's markdown rendering:
If a paragraph is marked tight, then we elide the `<p>` tag wrapping its children.

* Use ES5 Array.concat instead of ES6 spread operator.
2021-07-06 11:33:12 +01:00
RJ Skerry-Ryan
a1d9464011
Add optional KaTeX support to markdown plugin (#5846)
* Add optional KaTeX support to the tiddlywiki/markdown plugin.

Uses the remarkable-katex plugin 1.1.8 by Brad Howes to enable KaTeX support if
the tiddlywiki/katex plugin is installed. Fixes #2984.

TESTED:

Created a test wiki with:
```
$ node tiddlywiki.js test --init markdowndemo
$ node tiddlywiki.js test --listen
```

* Verified markdown support works without the tiddlywiki/katex plugin enabled.
* Verified markdown support works with the tiddlywiki/katex plugin enabled.
* Verified KaTeX (both inline and blocks) work as expected when the
tiddlywiki/katex plugin is enabled.

* Mention remarkable-katex plugin usage in the readme Tiddler.

* Include the remarkable-katex license as a tiddler.

* Include the Remarkable license.

* Include unminified original source of remarkable-katex 1.1.8.
2021-07-06 11:32:32 +01:00
jeremy@jermolene.com
0b71f25f74 Revert "Update sync methods (#5467)"
This reverts commit 8d7930f660.

See the discussion at https://github.com/Jermolene/TiddlyWiki5/pull/5467#issuecomment-873590578https://github.com/Jermolene/TiddlyWiki5/pull/5467#issuecomment-873590578
2021-07-05 19:26:20 +01:00
Saq Imtiaz
06318b7617
Pass reference to widget to CodeMirror (#5790) 2021-06-14 16:46:39 +01:00
Joshua Fontany
8d7930f660
Update sync methods (#5467) 2021-05-24 21:16:23 +01:00
BlueGreenMagick
c30ce544d1
Fix ViewToolbar items inconsistent spacing (#5473) 2021-05-24 19:24:37 +01:00
Saq Imtiaz
05d38054c8
Drag and drop images in the editor to import and insert (#5699)
* Merge

* Clean up

* More clean up

* Ensure image import works when type is not set, clean up post import actions

* Removed spurious new line

* For non image files insert a tiddler link

* Added documentation for new settings and features
2021-05-19 21:52:43 +01:00
jeremy@jermolene.com
d8ac00a108 TiddlyWebAdaptor: Avoid crashing if server sent events not available
Fixes #5663
2021-05-04 17:31:37 +01:00
jeremy@jermolene.com
953fb9f237 BibTeX Plugin: Force fieldnames to be lowercase
Fixes #5591
2021-04-07 17:43:41 +01:00
jeremy@jermolene.com
55735d7552 BibTeX plugin: Report errors more sanely
Fixes #5581
2021-04-04 11:25:39 +01:00
Cameron Fischer
ef6307a64e
Do not escape double quotes in tiddler DIVs to save space (#5383)
* double quotes are no longer escaped in html bodies

* changed tiddlyweb's html-div-tiddler; documentation

French version still needs a translation though
2021-04-02 09:32:32 +01:00
Joshua Fontany
a2e7cc51b5
Fix 5483 & 3483 (#5504) 2021-03-26 08:39:32 +00:00
jeremy@jermolene.com
81546c5bf4 Menubar plugin: Add optional dropdown-position
Fixes #5533
2021-03-08 17:47:04 +00:00
jeremy@jermolene.com
0ed32fded9 Freelinks: Add a filter for which tiddlers can be the targets of freelinks 2021-02-13 12:03:35 +00:00
Joshua Fontany
bfa062f23d
Fix filesystem (#5465) 2021-02-04 16:11:07 +00:00
jeremy@jermolene.com
f2aba29d94 Update to KaTeX v0.12.0 2021-01-31 15:11:12 +00:00
jeremy@jermolene.com
7be1e7e5f8 Xlsx-utils: Fix crash when using deserializer
Fixes #5400 (broken in #4601)
2021-01-16 15:37:50 +00:00
Nicolas Petton
17b4f53ba2
Add server sent events (#5279)
* Create server-sent-events.js

* Create sse-change-listener.js

* Implement server sent events

* Convert to ES5 and wrap in function

* Use the host string from tiddlyweb

* Improve comments in sse-server.js

* Can't use object reference as key

* Add retry timeout

* Fix a bug

* bug fix

* Fix formatting

* Fix ES5 compat

* capitalize comments

* more fixes

* Refactor tiddlywek/sse-server.js

* Extract helper functions for handling wikis and connections.
* Replace JSDoc comments.
* Fix formatting according to TW core.
* Simplify the logic for adding and removing connections.

* Fix formatting of tiddlyweb/sse-client.js

Fix formatting according to TW core.

* Fix formatting of server-sent-events.js

Fix formatting and comments following TW core guidelines.

* Extract a debounce function in sse-client.js

* Avoid using startsWith in server-sent-events.js

startsWith is part of ES2015, while TiddlyWiki uses the 5.1 dialect.

* New sse-enabled WebServer parameter

* If not set to "yes", disabled SSE request handling.
* Add documentation for the parameter in core/language/en-GB/Help/listen.tid
* Add new tiddler editions/tw5.com/tiddlers/webserver/WebServer Parameter_ sse-enabled.tid

* Disable polling for changes if SSE is enabled

* Add sse_enabled to /status JSON response
* Store syncer polling status in $:/config/SyncDisablePolling
* Handled disabling polling in core/modules/syncer.js

* Simply boolean logic in syncer.js

* Delete trailing whitespaces in syncer.js

Co-authored-by: Arlen22 <arlenbee@gmail.com>
2021-01-15 10:37:55 +00:00
jeremy@jermolene.com
e96a54c753 TiddlyWebAdaptor: Don't crash if "etag" header is missing 2021-01-03 11:46:40 +00:00
Simon Huber
8798ebadbd
Add foreground color to CodeMirror selections and fix #5272 (#5266)
* Add foreground color to CodeMirror selections

* Use default selection background if tiddler-editor-background matches selection-background
2020-12-13 11:40:57 +00:00
Bimba Laszlo
a17fa35c28
Remove menubar from print (#5273)
In the print view, a shadow appeared at the top of each page, and the
first lines were not visible.

I hide the menubar in the print view.
2020-12-13 11:37:07 +00:00
ento
ae61b08ae5
Fix browser testing (#5254)
* jasmine: specify 'after' only in Node

The commands module is never executed in browsers and the 'after'
constraint caused a regression where tests were never run in the
browser.

* jasmine: give the startup module a name like all others
2020-12-11 10:12:01 +00:00
jeremy@jermolene.com
50d8325d4c Dynannotate: Fix off-by-one error for end of annotation text 2020-12-09 19:14:43 +00:00
Simon Huber
90f05295a2
Add missing config options to ControlPanel->Settings->CodeMirror (#5229)
* Create cursorBlinkRate.tid

* Update config-language.multids

* Create indentUnit.tid

* Create indentWithTabs.tid

* Create smartIndent.tid

* Create tabSize.tid
2020-12-07 14:43:44 +00:00
Simon Huber
e8815b79ff
Update CodeMirror Dialog to always have a background color (#5217) 2020-12-06 17:21:35 +00:00
Simon Huber
b2d270a7e8
CodeMirror: Make colored selections based on palette work in chrome, too (#5215)
* Make colored selections based on palette work in chrome, too

* Update styles.tid
2020-12-06 13:00:19 +00:00
Joshua Fontany
b0f6d50b60
fix filesystem bugs (#5213) 2020-12-06 09:41:03 +00:00
Simon Huber
a3a7d6450d
CodeMirror: Ensure linenumber-gutter has a right border (#5212)
* Ensure linenumber-gutter has a right border

* Update GruvBoxDark.tid

* Update Nord.tid
2020-12-06 08:56:06 +00:00
ento
c4dcf510ef
Ensure jasmine-plugin startup module is executed in the right order (#5210) 2020-12-06 07:29:34 +00:00
Simon Huber
d957b3e4e6
Update CodeMirror styles to set selection colors based on foreground contrastcolour (#5200)
* Update styles.tid

* Update styles.tid

* Update styles.tid
2020-12-05 16:37:50 +00:00
Simon Huber
ae5d78b4dd
Update codemirror styles (#5198) 2020-12-04 19:14:59 +00:00
Simon Huber
9d5babc248
Bump CodeMirror plugin version (#5184) 2020-12-02 21:12:56 +00:00
Simon Huber
f0eba7fdc6
Re-add minified codemirror, without minification bug (#5180) 2020-12-02 16:55:37 +00:00
Simon Huber
9871c1a6a9
Small tweak for codemirror selected-linenumber (#5181) 2020-12-02 16:54:36 +00:00
Simon Huber
a1ef66ec6d
Better readability for codemirror linenumbers + CupertinoDark muted-foreground better contrast (#5164)
* Update styles.tid

* Update CupertinoDark.tid
2020-12-02 12:21:23 +00:00
Joshua Fontany
c6bb783308
Fix filesystem regression (#5176)
* $:/config/OriginalTiddlerPaths if no filters match

* fixed & docs updated

* tested with tiddlywiki.files & tw.com edition

* typos

* originalpath to options, propigate isEditableFile

* syntax cleanup
2020-12-02 09:47:51 +00:00
Simon Huber
c3055f92a9
Don't minify codemirror.js (#5173) 2020-12-01 20:55:22 +00:00
Simon Huber
cc1f32067f
Update CodeMirror to 5.58.3 - fix vim-mode cursor invisible (#5172)
* Update codemirror to v5.58.3

* Update jump-to-line.js

* Update search.js
2020-12-01 18:11:40 +00:00
Joshua Fontany
dde4182830
Fix filesystem adaptor (#5113)
* ignore .env

testing new implementation

almost there

closer

bug, desyncing

fixed

final testing

final testing

cleanup

cleanup

* isEditableFile flow fixed

* removed `basepath` logic

* callback to delete title from $tw.boot.files

* comment fix

* have syncer delete from boot.files

* syntax

* bugfix: error on missing directory

* bugifx

* remove !draft check

* fix relative filepaths

* cleanup

* cleanup !draft

* catch undefined filepaths in deleteTiddlerFile()

* typo

* whitelist wiki dir, encodeURIComponent otherwise

* test for wikiPath, not wikiPath/tiddlers

* don't need to .normailze()

* whitelist wiki directory, move cleanup to util

* use cleanup util & fail EPERM & EACCESS gracefully

* comments

* final bugs fixed

* improved sync error
2020-11-30 22:31:48 +00:00
Simon Huber
09d7a77f1b
Add default "tiddlywiki" styles to CodeMirror and Highlight.js (#5128)
* Update styles.tid

* Update styles.tid

* Update theme.tid

* Delete cm-theme-tiddlywiki.tid
2020-11-28 14:07:12 +00:00
Simon Huber
f591a78f37
Fix small typo in syncer-actions-refresh.tid (#5075) 2020-11-19 16:32:43 +00:00
Simon Huber
27bed615ab
Move styles from menubar plugin to vanilla/base (#5019)
* Update styles.tid

* Update base.tid

* Update styles.tid

* Update base.tid
2020-11-09 18:18:30 +00:00
Simon Huber
343207fc35
MenuBar: Add fallback value to breakpoint-plus-one and ... (#5009)
* Add fallback value to breakpoint-plus-one and ...

... sidebarbreakpoint-minus-one in case that widths aren't given in px units

* Update styles.tid
2020-11-08 22:38:08 +00:00
Simon Huber
4d85d267a1
Make navigating and editing Shadow tiddlers work again (#5004)
* Update search.tid

* Update Filter.tid

* Update Shadows.tid

* Update Standard.tid

* Update System.tid

* Update search.tid
2020-11-08 13:26:02 +00:00
Simon Huber
98f67373b1
Menubar plugin: make sidebar-scrollable top margin adjust ... (#4974)
* Menubar plugin: make sidebar-scrollable top margin adjust ...

... to height of menubar

* Update styles.tid

* Update styles.tid

* Update styles.tid

* Update styles.tid

* Update menu.tid

* Update styles.tid

* Update styles.tid

* Update styles.tid

* Update styles.tid

* Update menu.tid

* Update styles.tid

* Update styles.tid
2020-11-08 11:50:15 +00:00
ento
e574cb4724
Markdown plugin: add rel="noopener noreferrer" to external links (#4771) 2020-11-08 11:47:44 +00:00
Simon Huber
9854a4fc08
Fix #4998 - Pressing Enter creates Missing Tiddler (#5001)
* Update search.tid

* Update Filter.tid

* Update Shadows.tid

* Update Standard.tid

* Update System.tid

* Update search.tid

* Create Hidden Setting Search-NavigateOnEnter.tid
2020-11-08 11:43:24 +00:00
Simon Huber
b69b84b38e
Update core "tabs" macros to use explicitState (#4985)
* Update ControlPanel.tid

* Update Advanced.tid

* Update Appearance.tid

* Update Info.tid

* Update AddPlugins.tid

* Update Plugins.tid

* Update Saving.tid

* Update Toolbars.tid

* Update Plugins.tid

* Update More.tid

* Update TiddlerInfo.tid

* Update tabs.tid

* Update settings.tid

* Update ControlPanel.tid

* Update Advanced.tid

* Update Appearance.tid

* Update Info.tid

* Update AddPlugins.tid

* Update Plugins.tid

* Update Saving.tid

* Update Toolbars.tid

* Update Plugins.tid

* Update More.tid

* Update tabs.tid

* Update settings.tid

* Update TiddlerInfo.tid

* Update AdvancedSearch.tid

* Update Filter.tid

* Update Shadows.tid

* Update Standard.tid

* Update System.tid
2020-11-08 09:31:39 +00:00
Simon Huber
78c72b85fb
Make tag for menubar-contents dropdown configurable (#4983)
* Make tag for menubar-contents dropdown configurable

* Make tag for menubar-contents dropdown configurable

* Make tag for menubar-contents dropdown configurable
2020-11-06 16:26:44 +00:00
jeremy@jermolene.com
4394b8e723 Dynannotate: Add example of view template usage 2020-11-06 12:27:46 +00:00