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

308 Commits

Author SHA1 Message Date
Jermolene
df3e39d97a Update wikiparser file comment 2016-02-15 11:33:47 +00:00
Jermolene
99df9f46f7 Add support for tiddlers containing mp4 videos 2015-10-01 12:13:38 +01:00
Jermolene
ecdae4ceff Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
Jermolene
a204784c0c Limited implementation of external text tiddlers in the browser
Triggered by the discussion in #1917
2015-08-29 16:33:04 +01:00
Jermolene
58188cf805 Improvements to parser rule configuration
* Ignore parser rule configuration in safe mode
* Made text translatable
* Added new setting for camelcase links
* Added warning on parser rule configuration tab

See #1875
2015-07-31 13:33:33 +01:00
Jermolene
d5e690a06d First pass at global disabling of parser rules
This is to address #1875 more quickly than via #345.

This commit only includes a partial implementation of the UI - see the
ticket for details.
2015-07-30 12:28:29 +01:00
Jermolene
18e38bb2bc Fix bug with 2cb6400773
The problem was that we failed to escape the dash in the regexp,
meaning that it was matching all characters from “.” to “_”.
2015-07-14 08:33:12 +01:00
Jermolene
2cb6400773 Extend automatic system tiddler linking to digits and underscore
Fixes #1877
2015-07-13 14:42:55 +01:00
Jermolene
c6e48ebc2d Performance optimisations
In some situations, I’m seeing x2.5 speedups with these optimisations

Starts fixing #1864
2015-07-05 19:47:44 +01:00
Jermolene
b0cb17cd83 Re-establish caching of results of parsing a tiddler
I switched this optimisation off back in
ed35d91be6, in October 2013, as part of a
big refactoring of the parsing and widget mechanism. I’ve been meaning
to switch it back on for some time.

My rough measurements suggest that this optimisation can reduce
rendering time by 5-10%.
2015-07-05 17:48:18 +01:00
Jermolene
50c6ce8b73 Improve syslink parsing
Fixes #1767
2015-06-24 09:24:03 +01:00
Jermolene
050b643948 Sandbox HTML iframes
Otherwise Firefox allows code in html tiddlers to access the main
window:

https://groups.google.com/d/topic/tiddlywiki/NwOI-QER2ig/discussion
2015-01-28 13:50:39 +00:00
Tobias Beer
b43d4a33d6 simplified regexp
Ok, I think I've got it now. The following matches all...

1. starting with a literal `$:`
2. then any number of character not a whitespace, `<` or  `|`
3. closing with anything that is, again, not a whitespace, `<` or  `|`

Test here...

http://tbdemo.tiddlyspot.com/#Autolink%20System%20Tiddlers
2015-01-11 11:04:02 +01:00
Tobias Beer
795a929187 create syslink.js, revert extlink.js
introduces new parser for system links
2015-01-09 23:51:07 +01:00
Tobias Beer
8ba3e8973e autolinks system tiddlers
enhanced extlink parser to cover system tiddler links

of course, only those without spaces in their title

didn't want to open up an extra parser for this as extlink has all the
basics
2015-01-08 21:26:48 +01:00
Astrid Elocson
2f42c9fb8d Links and transclusions in railroad diagrams 2015-01-06 01:39:24 +00:00
Jermolene
1600beb193 Move the wikilink regexps into global config 2014-11-26 11:12:25 +00:00
Jermolene
93cb03eeab Allow whitespace after \end in macro definitions
Fixes #1090
2014-11-18 10:26:20 +00:00
Jermolene
5599f9f933 Fix problem with UTF-8 encoding of HTML tiddelrs
Fixes #1037
2014-11-03 16:20:49 +00:00
Xavier Cazin
6833bfb220 Add audio/ogg to the list of recognised audio formats 2014-10-19 22:09:17 +02:00
Jermolene
2ffe53f191 Add audio parser for handling audio content 2014-10-18 14:50:07 +01:00
Jermolene
a9f46525a0 Stop classifying digits as lower case letters in wikilinks
Fixes #842
2014-09-17 12:55:39 +01:00
Jermolene
3a67fdb768 Obeisance to JSHint for core modules
There are still some warnings about making functions in a loop, but
I’ll fix those as a separate pull request because the fixes are more
than typographic errors.
2014-08-30 20:44:26 +01:00
Jermolene
43aeb47fc3 Skip whitespace from start of inline macro definitions
Now `\define mymacro() yes` will not have a leading space in the
variable value
2014-08-28 20:21:09 +01:00
Jermolene
787481a804 Change more "tw-*" classes to "tc-*"
Part of #764
2014-08-28 18:21:08 +01:00
Jermolene
4a1c530da7 Rename "tw-tiddlylink-*" classes to "tc-tiddlylink-*"
Part of #764
2014-08-28 18:13:46 +01:00
Jermolene
b2e1dd2138 Allow whitespace after first line of multiline macro
Fixes the remaining part of #482
2014-08-11 13:52:10 +01:00
Jermolene
2526bfb078 Disable wikilinking when preceded with dash or underscore
“HelloThere” in “My-HelloThere” shouldn’t be wikified.

Part of #337
2014-08-08 16:20:15 +01:00
Jermolene
f8548cc8f2 Stop classifyinh "÷" (\u00f7) as an upper case letter
Part of #337
2014-08-08 16:12:23 +01:00
Jermolene
9c8564d5b0 Stop classifying "×" (\u00d7) as a lower case letter
Part of #337
2014-08-08 16:09:56 +01:00
Jermolene
d7390dbbe1 Remove support for underscore and dash in wikilinks
Starting to fix #337
2014-08-08 11:13:41 +01:00
Jermolene
5260899d8b Relax requirement for newline after macro definition 2014-08-07 16:00:20 +01:00
Jermolene
bf9a87dc0e Fix CR handling by HTML parser
@pmario and @welford - I’m not presenting this as a fix for #717
because I’m still not in a position to reproduce it.

However, I found this during a review of newline handling code, and
would be interested if it is implicated in the problems you are
reporting.
2014-08-03 09:43:22 +01:00
Mario Pietsch
6de453d796 remove stricethrough.js 2014-07-24 23:51:37 +02:00
Mario Pietsch
bb47f1dbad fix whitespace and filename 2014-07-24 23:49:42 +02:00
Mario Pietsch
95f6c92192 fixed whitespace 2014-07-24 23:47:13 +02:00
Mario Pietsch
7aa6c7c06d splited emphasis.js into several modules to have fine grained control with wikification rules eg: rules except bold ... This fixes #701 2014-07-24 17:43:03 +02:00
buggyj
0206358a1c added missing regex update for triple double-quotes macro params 2014-06-19 19:17:26 +02:00
buggyj
a2ec4c55e3 added triple double-quotes delimiters for marco/widget parameters (to support json strings) 2014-06-19 07:29:14 +02:00
Jermolene
9547a1f01c First pass at external image support
A bunch of little changes that together enable external image support.
Try:

```
tiddlywiki editions/tw5.com --verbose --build externalimages
```

Then open `externalimages.html`, look for the images in the more/types
tab of the sidebar, open them and verify that they are set with an
external SRC attribute, not a data URI.
2014-06-12 08:36:30 +01:00
Jermolene
f131c37893 Update HTML parser to use an IFRAME
Gives us better sandboxing of unsafe HTML content
2014-06-11 23:04:58 +01:00
Jermolene
f44f2b33ed Fixed missing class on external pretty links 2014-05-26 17:57:35 +01:00
Jermolene
c9c1b0fbb4 Get rid of the tweakParseTreeNode() hack
It’s an embarrassing hangover from a refactoring of the parsing
mechanism last year.
2014-05-14 08:51:08 +01:00
Jermolene
854b739a35 Implement explicit external links 2014-05-06 20:05:51 +01:00
Jermolene
abe0ce28b9 Fix typos in docs for image parser 2014-05-06 19:00:34 +01:00
Jermolene
552657fc58 Fix text parser to use codeblocks
This means that JavaScript and JSON tiddlers will be properly
highlighted if the highlight plugin is loaded.
2014-04-24 19:41:07 +01:00
Jermolene
ad4b03506a Added wikitext image support
We’ve added a parser to recognise the `[img[URL or tiddler title]]`
format, and an associated image widget.
2014-04-17 12:52:32 +01:00
Jermolene
ace57dd205 Refactor utilities out of HTML parser
Some of the functions are useful general purpose parser helpers.
2014-04-17 12:00:32 +01:00
Jermolene
4c648e7cdc Exclude more illegal characters from external links 2014-04-14 11:17:28 +01:00
Jermolene
93b9d16d6c Don't include pipe characters in URLs 2014-04-13 21:17:44 +01:00
Jermolene
ccefc1b17b Tolerate more whitespace in block elements
Previously the double newlines marking a block mode element couldn’t be
interspersed with whitespace.
2014-04-10 11:05:27 +01:00
Jermolene
5a085f7927 Add basic CSV parser 2014-03-31 12:41:02 +01:00
Jermolene
bdbbf94326 Update transclusion wikitext syntax to allow a template without a target tiddler
This allows us to transclude a tiddler without changing the current
tiddler with `{{||MyTiddler}}`.
2014-03-17 21:44:10 +00:00
Jermolene
cdf3e101a8 Fix crash with headings
`this.match[1].length` can get overwritten when we parse the content of
the heading
2014-03-17 20:55:08 +00:00
Jermolene
75ff9fb6c0 Allow the end of text to be treated as a linebreak for parsing HTML tags 2014-02-22 08:43:03 +00:00
Jermolene
c17844b815 Another fix for the block vs inline handline 2014-02-20 22:43:04 +00:00
Jermolene
06a0d21734 Use double linebreaks to indicate content of a widget or html element should be parsed in block mode
Fixes #82.

The old behaviour was to parse the content of a widget or html element
in block mode if the opening tag was followed by a line break. The new
behaviour requires two line breaks.

This makes it possible to include linebreaks more liberally within
wikitext, although care must still be taken to only use double line
breaks when the block mode behaviour is desired.

The code change here is very simple, just a single line change in
html.js. Most of the other changes are to convert various single line
breaks into double line breaks.
2014-02-20 21:42:31 +00:00
Jermolene
d5b526914b Simplify the regular expression for HTML comments
We were getting catastrophic backtracking in Chrome for some input
texts where the closing “—>” of the comment was omitted.
2014-02-12 15:24:03 +00:00
Jermolene
0c20092644 Refactor the image parser to avoid generating badly formed image src's
Previously, a transclusion of a skinny image tiddler (ie one where the
body has yet to be loaded) would render a broken image.
2014-01-29 19:11:05 +00:00
Jermolene
6255b97b14 Resolve merge conflict 2014-01-25 14:41:48 +00:00
Jermolene
2c790d982f Switch to using $tw.fakeDocument for the fakedom document object
So that we can free us `$tw.document` to be the actual DOM document
2014-01-15 14:57:35 +00:00
Jermolene
809c441ab3 Merge branch 'master' of https://github.com/jbolila/TiddlyWiki5 into jbolila-master 2014-01-13 17:28:08 +00:00
João Bolila
426f2978cf fixes of a newbie, me 2014-01-12 17:09:24 +00:00
Jermolene
b7a1db1e9f Display tiddler data dictionaries as plain text 2014-01-12 11:58:32 +00:00
João Bolila
82a48cf85c codeblock as a widget and plugin for highlight code blocks 2014-01-07 22:57:46 +00:00
Stephan Hradek
9fee9b1043 Fix for Paul's concerns 2014-01-07 21:12:59 +01:00
Jermolene
027421f5e6 More coding style consistency 2014-01-03 10:54:00 +00:00
Jermolene
1a74e2538c Cleaning up further coding style inconsistencies that have crept in 2014-01-03 10:50:00 +00:00
Jermolene
8fc5c1d4a0 Further style tweaks to #321 2014-01-03 10:48:00 +00:00
Jermolene
1374bd9d78 Coding style fixes for #321 2014-01-03 10:43:08 +00:00
Jermolene
307b5c7d6b Merging #321 Table valign from @Skeeve 2014-01-03 10:39:55 +00:00
Stephan Hradek
917865c393 fixed an initialization error 2013-12-31 11:09:17 +01:00
Stephan Hradek
ec14a0a16d vertical alignment of cells - version 2 2013-12-31 11:05:08 +01:00
Stephan Hradek
ce8cc7607f changed to conform to Jeremy's standards - sorry… 2013-12-30 13:44:32 +01:00
Jeremy Ruston
2ee5093944 Merge pull request #305 from Skeeve/issue_186
added a fix for issue #186
2013-12-30 04:06:05 -08:00
Stephan Hradek
14868d8228 also fixed issue #315 2013-12-30 00:28:43 +01:00
Stephan Hradek
3cc8138133 fixed issue #314 - fix for > at end of line 2013-12-29 23:57:42 +01:00
Stephan Hradek
8e080eac0a fixed issue #314 2013-12-29 23:51:22 +01:00
Stephan Hradek
f9de55ad5f added fix for issue #94 for horizontal rules, tables and typed block 2013-12-25 23:06:42 +01:00
Stephan Hradek
81106e500d added a fix for issue #186 2013-12-25 14:31:35 +01:00
Jermolene
ad6bf4f9c5 Extend support for .ico files
Now we can parse image/x-icon tiddlers for display, and provide an
entry for them in the type dropdown.
2013-12-24 09:07:25 +00:00
Jermolene
57adbe5bf7 Fixed typo in hardlinebreak parser 2013-12-14 17:42:50 +00:00
Jermolene
ef9175e7bc Remove debugging info 2013-12-14 17:07:47 +00:00
Jermolene
6a8feb216a Add parser rule for hard linebreaks 2013-12-14 17:05:57 +00:00
Jeremy Ruston
0a93edb1b6 Merge pull request #249 from Skeeve/quotes
added quote rules
2013-12-06 01:16:39 -08:00
Stephan Hradek
b0ff8bee6a as requested - quote.js removed because of quotelist - do not forget to add some css classes 2013-12-06 09:57:56 +01:00
Jermolene
ffcf2bfaac Missing comma
Omitted from 4d4a0e01b4
2013-12-05 16:20:22 +00:00
Stephan Hradek
374743883d inserted > into lists 2013-12-05 00:31:55 +01:00
Stephan Hradek
62b9fb336b fixed a small bug related to closing wiki-tag - no really 2013-12-01 22:05:49 +01:00
Stephan Hradek
8ed364ed72 fixed a small bug related to closing wiki-tag 2013-12-01 22:01:21 +01:00
Stephan Hradek
2ec58f7fa2 added quote rules 2013-12-01 21:21:15 +01:00
Jermolene
3b35d7dfe4 Fixed problem with greedy regexp for macrocalls
It was preventing this from working:

```
<<macro>><<bacrp>><<sdf>><<qweqwe>>
```
2013-11-17 21:53:12 +00:00
Jermolene
f6a4ea6b0f Fixed typo from d64590a12b 2013-11-11 23:44:55 +00:00
Jermolene
d64590a12b Fixed problem with target fields/index being erroneously applied to template
See here for discussion:

https://groups.google.com/d/msg/TiddlyWiki/D3MBNhjaT3E/ph0ZuAhuPFMJ
2013-11-11 22:29:38 +00:00
Jermolene
04e2f18ff1 Remove tooltip, classes and styles from transclusion syntax
Now that transclusion doesn't generate any intrinsic elements we don't
have an element to attach the tooltip, classes and styles to.
2013-11-10 22:46:37 +00:00
Jeremy Ruston
e93ac76581 Make sure external links have the class "tw-tiddlylink-external"
Fix #203
2013-11-08 12:26:32 +00:00
Jeremy Ruston
cc0011abd3 Get rid of the "new_" prefix we had on some methods
There's still the "old_" prefix to get rid of too.
2013-11-08 08:51:14 +00:00
Jeremy Ruston
b7cb1d3391 Change new_widget to widget
I was avoiding doing this until after the merge.
2013-11-08 08:47:00 +00:00
Jeremy Ruston
35adf4269a Merge backlog of changes from master branch
This is too easy. I'm worried.
2013-11-08 08:33:27 +00:00
Jeremy Ruston
9e3618bdcf Rename the 'title' attributes of various widgets to 'tiddler'
The change is to avoid confusion with the HTML 'title' attribute. The
name 'tiddler' better emphasises the purpose of the attribute, too.
2013-10-30 13:36:44 +00:00