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
Jeremy Ruston
14d7d5ea59
Use the new wiki.makeWidget() method where we can
2013-10-29 14:51:35 +00:00
Jeremy Ruston
5610efff01
Update typedblock parser to use new widget mechanism
2013-10-27 22:53:22 +00:00
Jeremy Ruston
632970cd86
Get external links working again
...
We no longer use the `<$link>` widget for external links. Instead the
parser generates `<a>` elements. This makes things simpler, but does
mean that the `target=_blank` behaviour is baked into the parser.
Probably we should introduce a new `<$extlink>` widget that generates
an `<a>` element with a configurable `target` attribute
2013-10-24 11:54:54 +01:00
Jeremy Ruston
d5f09a4608
Prevented generation of illegal elements
...
Previously, text like <-> would try to generate an element with an
illegal name, causing a JS error
2013-10-23 12:36:34 +01:00
Jeremy Ruston
c96cb6e956
Parse typed blocks with the new parser
2013-10-21 20:20:44 +01:00
Jeremy Ruston
2b5fb9801f
Add skype: protocol for external links
...
The matching of external links is hacky at the moment. The plan is to
make it more easily extensible (ie without writing code)
2013-10-20 10:47:02 +01:00
Jeremy Ruston
779d8b3aad
Update TW2 wikitext content type to text/x-tiddlywiki
...
And also stop assigning the default content type of
`text/vnd.tiddlywiki` to imported tiddlers.
2013-08-25 22:06:28 +01:00
Jeremy Ruston
be06257430
Split "transclude" widget into a separate "tiddler" and "transclude" widget
...
Belatedly realised that the design would be clearer without these two
separate concepts being conflated into a single widget.
As a result of this change, any other widget or template that generates
transclude widgets has needed adjustment.
2013-08-24 16:45:45 +01:00
Jeremy Ruston
3b563e19cf
Removed obsolete comments
2013-08-23 18:38:44 +01:00
Jeremy Ruston
f1a7e433ab
Allow widget names to include digits
2013-07-14 23:13:42 +01:00
Jeremy Ruston
b51fb9cfa9
Linting
2013-07-05 22:37:55 +01:00
Jeremy Ruston
12b471b8fb
Extend the HTML rendering mechanism to support attributes specified as macro invocations
2013-06-18 15:37:19 +01:00
Jeremy Ruston
18f8b7266e
Refactor the HTML element parser
...
The purpose is to allow attributes to be specified as macro
invocations. For example `<div myattr=<<mymacro param1 param3>>>`. The
parser needed sprucing up in order to copy with the nesting of angle
brackets. The refactoring has been done with an eye on using the same
technique in the filter expression parser (which is pretty messy at the
moment -- it throws exceptions for syntax errors, which is bad). Later
I'm hoping to extend the technique to create a more flexible table
parser.
2013-06-15 15:12:05 +01:00
Jeremy Ruston
6ae73e0fc7
Fix regex typos
...
The trouble with regexs being that they breed typos…
Fix #103
2013-06-05 19:06:31 +01:00
Jeremy Ruston
b0d183070c
Don't allow < and > in external links
2013-05-31 17:42:40 +01:00
Jeremy Ruston
5abc0a7835
Get rid of the obsolete font parser
2013-05-17 17:30:33 +01:00
Jeremy Ruston
551ebdc005
Major refactoring of rendering mechanism
...
We now use a fake DOM implementation on the server to let us share more
rendering code between the text output vs. DOM output paths.
2013-05-17 10:12:25 +01:00
Jeremy Ruston
6864251962
Cleaning up content types
...
Dealt with some inconsistencies
2013-05-13 17:42:07 +01:00
Jeremy Ruston
408fcd8aa3
Add a parser for woff fonts
...
It's a bit of a hack to have a parser dedicated to fonts. We'll replace
it with a mechanism that handles generic binary data
2013-05-01 13:04:27 +01:00
Jeremy Ruston
82308f642a
Use the text parser to parse CSS
2013-04-25 09:05:17 +01:00
Jeremy Ruston
64eadcfc41
Add an HTML parser
...
Allows one to embed raw HTML in wikitext with `$$$.html`/`$$$`
2013-04-10 17:02:37 +01:00
Jeremy Ruston
4bcebf5bbf
Fix HTML element parser to not pass capturing parenthesis in terminating regexp
2013-04-04 14:24:21 +01:00
Jeremy Ruston
c182533efc
Parse TiddlyWiki classic wikitext as plain text
...
Too many errors if we try to parse it as TW5 wikitext
2013-04-02 18:20:38 +01:00
Jeremy Ruston
5a6c2b91f8
Parse JSON as text so that it doesn't generate missing tiddlers
2013-03-19 18:26:55 +00:00
Jeremy Ruston
d7896f051a
Fixed problem with greediness of filtered transclude regexp
2013-03-02 13:01:44 +00:00
Jeremy Ruston
c85acd71fe
Move the void element list into the main config file
2013-02-03 17:44:28 +00:00
Jeremy Ruston
d3fefa8b16
Fixed regexp for filtered transclusion
...
Previously we couldn't use filter expressions that included curly braces
2013-01-21 17:24:47 +00:00
Jeremy Ruston
d28ee0b82a
Change module type for parsers to "parser"
2013-01-16 13:56:11 +00:00
Jeremy Ruston
baff901685
Added ability to transclude fields of data tiddlers
...
This allows us to transclude colours into CSS
2013-01-15 17:50:47 +00:00
Jeremy Ruston
6d24cedbcc
Refactored widget renderers to be hosted within HTML element renderers
...
This arrangement takes better advantage of the similarities between the
now deleted widget renderer and the element renderer. It also obviates
the need for wrapper elements around every widget.
2013-01-03 16:27:55 +00:00
Jeremy Ruston
61eb585640
Fixed problem with HTML inline parse rule
...
We were incorrectly eating line breaks after self-closing inline HTML
tags
2012-12-31 18:36:13 +00:00
Jeremy Ruston
7d5c355d9e
Make the html parser rule work in block mode as well as inline mode
2012-12-30 17:21:38 +00:00
Jeremy Ruston
300b6cc485
Change widget syntax to $
instead of underscore
...
eg `<$list>`
2012-12-30 13:55:19 +00:00
Jeremy Ruston
f496cd540e
Store macros in the render context so that they scope in the expected way
2012-12-29 23:17:09 +00:00
Jeremy Ruston
ea13652a64
Fixed subtle little typo
2012-12-29 23:16:34 +00:00
Jeremy Ruston
b9a7f0ed39
Added typed blocks
2012-12-29 22:29:24 +00:00
Jeremy Ruston
27ccb581be
Don't trim macro definition bodies
2012-12-29 22:27:51 +00:00
Jeremy Ruston
b006cf163f
Remove the old parser code
...
Thus introducing a few functional regressions, but it's going to be
easier to fix things up without the old code knocking around and
getting in the way.
2012-12-28 22:08:32 +00:00
Jeremy Ruston
d6e531e87c
Extend new parser mechanism to determine parser based on content type
...
And add an image parser and a plain text parser
2012-12-27 17:08:29 +00:00
Jeremy Ruston
c078edf468
Rename the old image parser to make room for the new one
2012-12-27 17:07:35 +00:00
Jeremy Ruston
c703fb1267
Get rid of the wikivocabulary object
2012-12-26 22:02:59 +00:00
Jeremy Ruston
cbc08fcc1c
Reorganise the old parsers preparatory to replacing them
2012-12-26 20:03:33 +00:00
Jeremy Ruston
8684c375b8
Rename horizontal rule parser rule for less "rule"-based confusion
2012-12-26 19:49:01 +00:00
Jeremy Ruston
03e46ad8f5
Add "rules" pragma for specifiying parser rules to be used for a tiddler
2012-12-26 19:35:54 +00:00
Jeremy Ruston
2635b62a73
Fix bug in styleblock regexp
2012-12-26 19:33:22 +00:00
Jeremy Ruston
0e418f6e8d
Fix the macro definition regexp
2012-12-26 19:33:11 +00:00
Jeremy Ruston
c1ec1578ec
Make sure the parser rules have unique names
2012-12-26 19:32:54 +00:00
Jeremy Ruston
4cf1c9ed1e
Fix problem with the regexp for the "dash" parser
2012-12-26 19:32:06 +00:00
Jeremy Ruston
11d001ad80
Added inline variant of filtered transclusion syntax
2012-12-23 10:47:14 +00:00
Jeremy Ruston
c3a2a24b76
Introduce filtered transclusion syntax
2012-12-23 10:37:18 +00:00
Jeremy Ruston
05ccb85759
Add template syntax for transclusion
2012-12-23 10:36:55 +00:00
Jeremy Ruston
c31c12d698
Fix bug with extraneous dot in classed blocks
2012-12-23 10:36:25 +00:00
Jeremy Ruston
6fae946bda
Replace classed blocks and runs with styled blocks and runs
2012-12-22 23:10:06 +00:00
Jeremy Ruston
982b6a8773
Switch code block syntax
2012-12-22 23:09:44 +00:00
Jeremy Ruston
8f85ef94a6
Stop using triple curly braces for code
...
We'll use triple curly braces for filtered transclusions, and require
backtick for code.
2012-12-22 23:09:10 +00:00
Jeremy Ruston
015145952d
Added support for block macro calls
2012-12-20 17:03:41 +00:00
Jeremy Ruston
b0893956bc
Start introducing both inline and block variants of macro calls
2012-12-20 16:55:08 +00:00
Jeremy Ruston
0cb76f6fc0
Mark each rule with its type as it is instantiated
2012-12-20 16:49:04 +00:00
Jeremy Ruston
094f8c32ca
Finishing moving the parser rules about
2012-12-20 16:41:06 +00:00
Jeremy Ruston
54423e599c
Moving the wikiparser rules around
2012-12-20 16:38:33 +00:00
Jeremy Ruston
42945789e9
Refactor parser rule architecture to allow individual parsers to function as both block and inline parsers
2012-12-20 16:02:03 +00:00
Jeremy Ruston
2f091fefda
Removed erroneous cruft
2012-12-20 15:43:12 +00:00
Jeremy Ruston
055bdd8d8f
Added inline transclusion as well as block transclusion
2012-12-20 15:07:38 +00:00
Jeremy Ruston
360e188e49
Continuing renaming run rules to inline rules
2012-12-20 12:18:38 +00:00
Jeremy Ruston
fc28ed0bbb
Renaming parser "run rules" to "inline rules"
2012-12-20 12:02:35 +00:00
Jeremy Ruston
2689f6b1e5
Loosened dash formatting rule
...
It no longer has to be followed by whitespace, instead it must be
followed by anything other than a dash.
2012-12-20 09:26:59 +00:00
Jeremy Ruston
a63c7a8822
More parser rules
2012-12-15 17:35:35 +00:00
Jeremy Ruston
0c3c2eeec6
Improve implementation of classed runs
2012-12-15 17:35:16 +00:00
Jeremy Ruston
e3462e5606
Added more parse rules
2012-12-15 11:39:58 +00:00
Jeremy Ruston
228ee92e95
Enhanced wiki text parser to selectively eat terminator regexp matches
2012-12-15 11:38:28 +00:00
Jeremy Ruston
94d1c20846
Introduced widget base class
...
And renamed the wiki rule base class
2012-12-14 17:38:46 +00:00
Jeremy Ruston
2bef7c2c5c
Further improvements to parser rule implementation
2012-12-14 15:44:19 +00:00
Jeremy Ruston
31b283ef36
Refactoring implementation of wiki parse rules
...
And some documentation.
2012-12-14 13:31:47 +00:00
Jeremy Ruston
d338a54370
Introduce refactored wiki parser and renderer
...
This is a half-way through a big refactoring of the parsing and
rendering infrastructure. The main change is to separate the parse and
render trees, which makes the code a lot cleaner. The new parser isn't
yet functional enough to replace the existing parser so for the moment
you have to manually invoke it with `$tw.testNewParser()` in your
browser console. I really ought to use branches for this kind of
thing...
2012-12-13 21:34:31 +00:00
Jeremy Ruston
91e1a38db1
Switched to use double curly braces for transclusion
...
For compatbility with MediaWiki and other engines
2012-11-29 18:34:27 +00:00
Jeremy Ruston
6d09b2fb9c
Improve syntax for classed runs
2012-11-29 17:23:46 +00:00
Jeremy Ruston
97f6314dbb
Update the tiddler and list macros to allow the template to be specified in the body of the macro
2012-11-29 16:40:06 +00:00
Jeremy Ruston
515e0d9bf1
Fixed bug with table parser
2012-11-26 14:19:54 +00:00
Jeremy Ruston
84650b9a54
Swap over to the new mime type conventions
...
Discussed in
https://groups.google.com/forum/#!topic/tiddlywikidev/re8xfLqZNCE
2012-11-18 15:22:13 +00:00
Jeremy Ruston
41db3d89ae
Use the plain text parser to display HTML files
...
We could display the HTML in an IFRAME but I think that's often not
what people want
2012-11-18 14:57:10 +00:00
Jeremy Ruston
addef09d1c
Fix problem with JS parser crashing on skinny tiddlers
2012-11-18 14:56:33 +00:00
Jeremy Ruston
605a7a4124
Fixed problem with missing macros throwing an error
2012-11-18 13:43:06 +00:00
Jeremy Ruston
bf04207350
Rename the wikitext parser
2012-11-15 12:53:10 +00:00
Jeremy Ruston
5f9b2e9d84
Turn the TiddlyWiki 2.x.x parser into a plugin
2012-11-15 12:47:09 +00:00
Jeremy Ruston
539b64b626
Refactoring module mechanism
...
Changed the data structure $tw.modules.types to make it possible to
detect repeated registrations
2012-11-14 11:23:43 +00:00
Jeremy Ruston
9f6909ddc4
Appeasing the gods of JSHint
2012-11-06 17:21:56 +00:00
Jeremy Ruston
dcac40ac31
Change the transclude wikitext rule to use the list macro
2012-10-16 18:50:44 +01:00
Jeremy Ruston
4530eaf24a
Update transclude parser rule to use the tiddler macro for single tiddlers
2012-10-15 19:03:05 +01:00
Jeremy Ruston
fc19a77353
Added support for PDF images
2012-10-10 10:45:39 +01:00
Jeremy Ruston
7a15b6f97a
Fixed mis-renaming of tiddlywiki.files
2012-08-31 15:09:33 +01:00
Jeremy Ruston
ed3a10f043
Renamed tiddlywiki.plugin
files to tiddlywiki.files
...
Because we're just about to use the name `tiddlywiki.plugin` for
exploded plugin folders
2012-08-31 15:04:08 +01:00
Jeremy Ruston
daff9c10f3
Tighten terminology for plugins vs. modules
...
"Plugins" are bundles of tiddlers managed as one, "modules" are
JavaScript tiddlers with a module type identifying when and how they
should be executed.
2012-08-03 15:09:48 +01:00
Jeremy Ruston
1f52b40cb6
Added parser rule for HTML format comments
...
And try it out in the PageTemplate, which is getting pretty
unintelligable
2012-08-02 22:06:52 +01:00
Jeremy Ruston
c1e33ccacb
Changed default type for typed blocks to be text/plain
2012-07-18 14:28:17 +01:00
Jeremy Ruston
f90b127349
Add table formatting rule
2012-07-16 21:13:33 +01:00
Jeremy Ruston
a2da94e657
Fixed problem with wikitext macro rule selecting block mode wrongly
2012-07-16 13:58:00 +01:00
Jeremy Ruston
0bd059c1f7
Run version of class wikitext rule
2012-07-15 23:07:25 +01:00
Jeremy Ruston
a7dd86b52a
Adjust wikitext html rule to parse in block mode if the opening tag is immediate followed by a newline
2012-07-15 23:06:51 +01:00
Jeremy Ruston
a149510fa3
Undo the filename change of classblock
2012-07-15 22:38:34 +01:00
Jeremy Ruston
59d9e683d8
Rename classblock parse rule to "class"
2012-07-15 22:37:25 +01:00
Jeremy Ruston
87749397c0
Fixed embarrassing bug with the heading wikitext rule
2012-07-15 18:12:45 +01:00
Jeremy Ruston
c74d608418
Removed parser switch
2012-07-14 18:08:00 +01:00
Jeremy Ruston
0d928c05a5
Added new transclude wikitext rule and macro
...
Which allows us to get rid of the tags macro
2012-06-19 08:57:29 +01:00
Jeremy Ruston
6745c7fbf7
Better to use terminating semicolons after each style specifier
...
More compatible with TW2 too
2012-06-14 19:03:51 +01:00
Jeremy Ruston
b41a1cb4de
Fixed problem with styled block wikitext rule
2012-06-14 18:49:51 +01:00
Jeremy Ruston
11c9031873
Added support for style blocks
2012-06-14 18:18:32 +01:00
Jeremy Ruston
fa279514c7
Made the class block rule do it's own class assignment
2012-06-14 17:40:27 +01:00
Jeremy Ruston
298b10b8f9
Fixed typo in comment
2012-06-10 18:09:00 +01:00
Jeremy Ruston
e0b630686e
Refactored wikitext parser to deal better with terminated blocks
2012-06-10 17:26:54 +01:00
Jeremy Ruston
3e49513c73
Renamed class wikitext rule as a block rule
2012-06-10 13:40:19 +01:00
Jeremy Ruston
e88873e3a8
Removed mistaken suppression of trailing newlines in JS comments
2012-06-09 22:39:13 +01:00
Jeremy Ruston
cde03baf24
Take newlines out of JS comments
2012-06-09 22:25:31 +01:00
Jeremy Ruston
9274651bfd
Parse HTML tag contents as a block if it is a block tag
2012-06-09 15:08:30 +01:00
Jeremy Ruston
67b4c86c98
Refactored file layout for JavaScript parser
2012-06-08 11:48:46 +01:00
Jeremy Ruston
22b27f4251
Ensured block macros parse their content as blocks, rather than a run
2012-06-07 13:09:48 +01:00
Jeremy Ruston
698f2c39cb
Updated wikitext class
rule to use parseBlockTerminated() method
2012-06-07 13:09:22 +01:00
Jeremy Ruston
52f86e7b01
Added parseBlockTerminated() method to new wikitext parser
2012-06-07 13:08:50 +01:00
Jeremy Ruston
31257489a7
More docs updates
2012-06-06 10:15:20 +01:00
Jeremy Ruston
a318ad77cd
Removed extraneous calls to skipWhitespace
...
Instead we'll skip whitespace at the start of a run
2012-06-05 23:15:52 +01:00
Jeremy Ruston
b989e05d98
Improved wikitext docs
2012-06-05 22:54:36 +01:00
Jeremy Ruston
ad25ab4c1a
Fixed parsing problem
...
We need to recheck for the next terminator after a successful run match
to cope with the situation that the run match included the previously
found terminator match
2012-06-05 22:01:06 +01:00
Jeremy Ruston
ee7fba9297
Added support for macros with embedded content
2012-06-05 17:01:17 +01:00
Jeremy Ruston
03da553c3b
Added wikitext for m- and n-dashes
2012-06-05 16:33:35 +01:00
Jeremy Ruston
ca8cf1a386
Simplified wiki link CamelCase regexp
...
Removed rule that made `AAaaa` be a wikilink
2012-06-05 15:19:27 +01:00
Jeremy Ruston
e85ae59fd8
Added ability to suppress external links
2012-06-05 15:14:33 +01:00
Jeremy Ruston
9ab9c9cc42
Added run rule for HTML entities
2012-06-05 15:00:55 +01:00
Jeremy Ruston
d29f4fa996
Removed extraneous indicator that the external link parser is a block parser
2012-06-05 15:00:42 +01:00
Jeremy Ruston
10fb5fd11c
Added run parse for external links
2012-06-05 14:43:43 +01:00
Jeremy Ruston
55dd392fe4
Added run parser for emphasis like bold and italics
2012-06-05 14:43:31 +01:00
Jeremy Ruston
f50e025f7c
Refactored run parser so that it can optionally not consume the terminator
2012-06-05 14:41:30 +01:00
Jeremy Ruston
ec342ed245
Added image rule
2012-06-04 16:13:08 +01:00
Jeremy Ruston
4f4fbbfd36
Added typed block support
2012-06-04 13:39:20 +01:00
Jeremy Ruston
537c0901e3
Fixed JavaScript line comments to be parsed as text runs
2012-06-04 13:39:10 +01:00
Jeremy Ruston
c2927eb032
Added support for unterminated runs
2012-06-04 13:38:33 +01:00
Jeremy Ruston
17c77fb3b8
Fixed element used for block code blocks
2012-06-04 12:25:08 +01:00
Jeremy Ruston
7a62e6f1a4
Add quick switch for replacing old wikitext parser with the new
2012-06-02 13:19:46 +01:00
Jeremy Ruston
ec933eb1b5
Completed code blocks and runs
2012-06-02 10:15:52 +01:00
Jeremy Ruston
80b2d9c9fe
Ensured terminator matches take precedence over rule matches
2012-06-02 10:15:41 +01:00
Jeremy Ruston
d30b63f752
Reorganised file layout for new wikitext parser rules
2012-06-02 09:54:00 +01:00
Jeremy Ruston
1be4dc3cd9
Reorganised file layout for new wikitext parser
2012-06-02 09:53:45 +01:00