1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-07 18:39:57 +00:00
Commit Graph

2928 Commits

Author SHA1 Message Date
Jermolene
892a1f560e Trap JSON syntax errors during import
Fixes #2609
2016-10-13 14:16:55 +01:00
Jermolene
da298f037d Remove extraneous console.log()
Fixing f97c1226aa
2016-10-12 15:50:43 +01:00
Jermolene
f97c1226aa Prevent HTML parser from mis-recognising email addresses
Email addresses such as `<jeremy@example.com>` were being erroneously
parsed as HTML tags.

Fixes #2604
2016-10-12 13:17:53 +01:00
Jermolene
989cee5059 Suppress search results if search string is too short
Fixes #2603
2016-10-11 09:27:26 +01:00
Jermolene
ffcbcbfa82 Add new 'minlength' operator
Fixes #1493
2016-10-11 09:26:20 +01:00
Devin Weaver
f1090d749e Fix str.length strEndsWith bug (#2572)
This was some how missed in dev testing I guess. @buggyj suggested this.

Should fix #2571
2016-10-08 14:06:30 +01:00
Tobias Beer
b9299309cc Fixes #2076 single line macros shouldn't need terminating line break 2016-10-08 13:44:30 +01:00
Tobias Beer
bf253a603b Removed unused vars + some whitespace (#2106) 2016-10-08 13:32:14 +01:00
Tobias Beer
f575389d89 Update wikiparserrules operator for no operand (#2193)
* return all wikiparserrules w/o operand

* simpler layout & code / updated instruction details

Also wanted to link each rule to the official docs using a dictionary at
`$:/language/Docs/ParserRules/`. However, without #2194 this is not
doable.
2016-10-08 13:04:11 +01:00
Tobias Beer
d038e0bc1b Filter titles in new fieldname popup by entered string (#2585) 2016-10-08 12:18:19 +01:00
Tobias Beer
3486acaec6 Remove old titles from story on save (#2587)
fix for #2381
2016-10-08 12:17:27 +01:00
Tobias Beer
808587f1c1 Fixes #2311 allows ctrl-enter to add tag and field (#2590)
fixes #2311

demo: http://2311.tiddlyspot.com
2016-10-08 11:53:20 +01:00
Tobias Beer
c7b31b0242 allows textPrimitives.anyLetter in syslink (#2596)
* allows textPrimitives.anyLetter in syslink

now only supports anyletter as per request by @jermolene
2016-10-08 11:51:07 +01:00
Jermolene
641eeaf611 Refresh action widgets before invoking them
Fixes #2599, at least partially.
2016-10-08 10:19:09 +01:00
Jermolene
c4e13bc94a Add icon and message handler for print button
I’m inclined to think it’s not worth adding a corresponding page
control button because it’ll require a lot of tiddlers for the
translation etc.
2016-10-08 10:10:54 +01:00
Jermolene
b867b7487e Fix tw2-plugin-check warning so that more than one plugin is displayed 2016-09-30 18:27:45 +01:00
Jermolene
292d653880 Fix typo affecting created/creator fields when deleting field
Fixes #2579
2016-09-28 11:18:58 +01:00
Jermolene
3ad8cf59bd Add column count CSS macro
Still needs prefixing for Firefox
2016-08-27 14:24:07 +01:00
Jermolene
5f0a1dd967 Revision of 03db25cf38
We should only fallback to the classic storyview if a storyview was
specified; if none was specified then we shouldn’t use a storyview.
2016-08-27 14:24:07 +01:00
Jermolene
03db25cf38 Fallback to "classic" if specified storyview not found
Fixes #2555
2016-08-26 11:34:43 +01:00
Jermolene
4d74f52202 Remove extraneous text
Copy/paste whoops.
2016-08-20 17:11:54 +01:00
Jermolene
05b32728bc Allow browser-based file reading to use deserializers for binary files 2016-08-20 17:09:22 +01:00
Jermolene
ffae85140f Fix state cleanup for excise toolbar button
We were deleting the wrong tiddler
2016-08-18 08:59:09 +01:00
Jermolene
7bc7f643b6 Remove extraneous console.log 2016-08-16 15:48:25 +01:00
Jermolene
18dd8d4433 Fix problem with lazy loading under Node.js
Fixes #2514
2016-08-16 15:48:14 +01:00
Jermolene
e20bce5450 Add experimental support for RTL languages
This commit permits language plugins to carry the field
“text-direction” with the value “rtl” to trigger right-to-left layout
of the entire page. We also adjust the sidebar layout to work in RTL
mode.

There are still a number of problems to be addressed:

* Brackets and other punctuation incorrectly placed within en-GB UI text
* System tiddler titles are rendered semi-back-to-front (eg
`languages/ca-ES/:$`)

Starting to address #1845 and the discussion in #2523.
2016-08-15 19:47:26 +01:00
Jermolene
4eed18496f Extend editor link button to create external links and missing links
Fixes #2521
2016-08-07 10:18:53 +01:00
Jermolene
959a7ac485 Add icon for foldbar visibility control
Fixes #2525
2016-08-07 10:16:44 +01:00
Jermolene
8f6abf534f Add descriptions for missing module types 2016-08-06 21:38:17 +01:00
Jermolene
7326a3a4cc Only call isReady() for sync adaptors that support it
Fixes #2522
2016-08-06 14:45:33 +01:00
Jermolene
08cfa88249 Fix problem with unsafe use of String.prototype.replace()
We were using `String.prototype.replace()` without addressing the
wrinkle that dollar signs in the replacement string have special
handling. This caused problems in situations where the replacement
string is derived from user input and contains dollar signs.

Fixes #2517
2016-08-06 14:45:33 +01:00
Jermolene
e49d310ea9 Relax external link matching to ignore illegal characters
Fixes #2501, and rolls back some of #2324
2016-07-20 11:37:44 +01:00
Jermolene
782553eb62 Remove tilde from characters not allowed in external URLs 2016-07-13 14:06:47 +01:00
Jermolene
b24488174c Prepare for 5.1.13-prerelease 2016-07-13 12:14:24 +01:00
Myeongjin
98b435d550 Fix inconsistencies in language string IDs (#2494) 2016-07-13 10:00:21 +01:00
Jermolene
dca9e008ce Remove single quote from illegal characters in URLs
Fixes #2493
2016-07-12 17:22:20 +01:00
Devin Weaver
bf74d13df5 Handle binary files better when saving on Node.JS (#2420)
* Save binary tiddlers with meta file

The filesystemadaptor plugin was a little simplistic in its
understanding of a binary file. It was using the typeInfo dictionary to
choose what tiddler types were binary (and hence needed a meta file when
saving).

I looked as if it was trying to be smart by looking for the hasMetaFile
*OR* had the encoding of base64. Unfortunately the typeInfo only defined
image/jpeg and so any other base64 encoded tiddler was assumed to be of
type text/vnd.tiddlywiki.

The net effect was only JPG images got a meta file and everything else
were saved as .tid files with base64 encoding. It all still worked but
made working with binary data in a Git repo a bit daunting.

There is enough information in the $tw.config.contentTypeInfo to
determine if a tiddler type is encoded with base64 or not. A better list
is available from boot/boot.js who registers all the types thorough the
registerFileType and marks then with base64 were appropriate.

This commit uses the typeInfo dictionary first for any filesystem
specific overrides, then the contentTypeInfo, and finally defaults to
the typeInfo["text/vnd.tiddlywiki"]. It also eliminates the now
unnecessary override for image/jpeg.

I think this might have been the original intent from commit 10b192e7.
From my limited testing all files described in boot/boot.js (lines
1832-1856) with an encoding of base64 now save as the original binary
and a meta file. Meaning that when you start the node server and then
drag-n-drop a binary file (i.e. image/png) it will PUT to the server
and then save it on the filesystem as-is allowing the file to be managed
as a binary file and not a text file. (Binary diffs are better and
GitHub supports them as well).

* Prevent duplicate file extensions

A side effects of using the $tw.config.contentFileInfo in the previous
commit is that it will always append a file extension to the tiddler
title when saving. In most cases this is the correct course of action.
However, sometimes that title is already a proper filename with an
extension (for example importing 'foobar.png' would save a file named
'foobar.png.png') which seemed silly.

This commit simply checks to make sure the title does not already end
with the file extension before appending it to the filename. A little
convenience really.

Since IE apparently doesn't have the String endsWith method I took the
liberty to add a helper method to $tw.utils trying to follow the other
polyfill patterns. I figured this was more generic and readable then
attempting to use a one-off solution inline. I got the polyfill code
from MDN.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith#Polyfill

Is strEndsWith the best method name?
2016-07-11 11:18:19 +01:00
Brent Maxwell
19e699d330 Added mobile-web-app-capable meta tag for Android Chrome (#2456)
* Added mobile-web-app-capable meta tag for Android Chrome

* Added "mobile-web-app-capable" meta tag to the rest of the templates.
2016-07-11 11:16:58 +01:00
Jermolene
c3d18364c1 Don't use syncadaptors until they are ready
Fixes #2453
2016-07-05 11:29:59 +01:00
Jermolene
ff57b4084a Extend notification handler to accept variables
Now we can provide variables to be passed to the rendering of the
notification text
2016-07-03 14:55:41 +01:00
Jermolene
6f8ee52e90 Text-editor: fix placeholder colour in Chrome 2016-07-03 14:53:37 +01:00
Devin Weaver
c0b55b4498 Show tags with contrast colour in edit template (#2484)
Closes #2483

Copy the same pattern from core/ui/TagTemplate.tid and use it in
core/ui/EditTemplate/tags.tid
2016-07-01 10:40:37 +01:00
Jermolene
e8e9759816 Add more flexible support for static content
Passing the static content through the `$:/core/templates/html-tiddler`
template made it impossible to produce output that wasn’t HTML encoded
(eg stylesheets).
2016-06-23 16:29:51 +01:00
Jermolene
3d5885f5a5 Extend view widget with plainwikified format 2016-06-23 16:28:59 +01:00
Jermolene
f51f6bf774 Fix URI in "put" save handler
We don’t want the location hash
2016-06-23 16:23:36 +01:00
Jermolene
bdd5aa9343 Trap missing tiddlers in savetiddler command 2016-06-23 16:19:00 +01:00
Andrew J Harrison
f76c7e9560 Refactor $:/core/ui/TagTemplate using sub-tiddlers (#2477)
The Open All by tag feature should really be in a plugin.
2016-06-14 16:46:40 +01:00
Richard Smith
b326ba5b2c Fixed: Titles containing a URL are interpreted as external links (#2324) 2016-06-05 20:03:04 +01:00
Myeongjin
423086bd11 Add localisable string for missing plugin info (#2465) 2016-05-26 09:06:17 -06:00
Bram Chen
9cb4c5f675 Clean up line endings (#2462)
Convert line endings to Linux style ("\n") to ensure greater consistency in repository.
2016-05-25 12:11:03 -06:00