1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-26 08:56:52 +00:00
Commit Graph

374 Commits

Author SHA1 Message Date
lin onetwo
53296a484c fix: macro in widget param 2024-10-13 20:55:03 +08:00
lin onetwo
375df47b19 feat: restore inline macro def 2024-10-13 03:26:35 +08:00
lin onetwo
1c50996a13 refactor: lowercase the parseblock rule name 2024-10-02 13:49:44 +08:00
lin onetwo
1a45520909 lint: double quote 2024-10-02 13:47:41 +08:00
linonetwo
03798d7fef Update conditional.js 2024-09-04 16:46:32 +08:00
lin onetwo
f5fca2a4d4
Update conditional.js to not include space 2024-09-04 16:43:05 +08:00
lin onetwo
658053643f Merge remote-tracking branch 'upstream/master' into feat/to-string 2024-08-10 12:44:10 +08:00
lin onetwo
398d7f7fe7 lint: useless ai generated comments 2024-08-10 12:43:26 +08:00
lin onetwo
08e9312295 feat: run all tests 2024-08-10 02:35:07 +08:00
lin onetwo
c4f6136fa7 feat: use void node to carry important info for typedblock 2024-08-10 02:33:50 +08:00
lin onetwo
0adf638c1a refactor: reuse block on inline when possible 2024-08-10 01:31:55 +08:00
lin onetwo
589241a406 feat: transcludeblock 2024-08-10 01:31:43 +08:00
lin onetwo
3cf93d08e5 lint: useless comments 2024-08-09 22:45:14 +08:00
lin onetwo
856cb42039 Update table.js 2024-08-09 22:33:05 +08:00
lin onetwo
43f3f8b5ed feat: styleinline 2024-08-09 19:50:07 +08:00
lin onetwo
7c73f1f922 feat: styleblock 2024-08-08 23:52:48 +08:00
Rob Hoelz
3707e10ef6
Add start/end properties for table row/cell elements (#8494)
* Add test for existing table parsing functionality

* Add expected start/end for tr elements in table wikitext test

* Populate start/end properties for tr elements

* Add expected start/end for th/td elements in table wikitext test

* Populate start/end properties for th/td elements
2024-08-08 10:06:44 +01:00
lin onetwo
078cd5fba2 feat: add to styleblock 2024-08-08 01:16:27 +08:00
lin onetwo
6ac9592bd7 fix: void node need to handle its children 2024-08-05 02:31:16 +08:00
lin onetwo
7bc408b3b0 feat: ast to use new widget type void 2024-08-04 14:38:54 +00:00
lin onetwo
b22ca2b3df feat: add void: true, in ast node to prevent render 2024-08-04 18:54:15 +08:00
lin onetwo
c39297698f fix: render invisible comment and parsemode as data element 2024-08-04 00:48:29 +08:00
lin onetwo
2a75077747 fix: parsemode don't have node 2024-08-04 00:35:16 +08:00
lin onetwo
9df36a2b15 refactor: ' -> " 2024-08-04 00:29:33 +08:00
lin onetwo
f69795c62e feat: list 2024-08-03 22:41:58 +08:00
lin onetwo
7b4ea476f3 fix: use "" for string param 2024-08-03 20:29:55 +08:00
lin onetwo
63613ceec0 feat: $tw.utils.serializeAttribute 2024-08-03 16:21:55 +08:00
lin onetwo
383e1b68b5 fix: some test 2024-08-03 02:04:26 +08:00
lin onetwo
e49238df55 fix: some test 2024-08-03 01:19:05 +08:00
lin onetwo
b1667ecb9d fix: condition manually
Deekseek is silly
2024-08-03 01:05:49 +08:00
lin onetwo
d0678716aa fix: remove pragma:true, otherwise following text will become children of it 2024-08-03 00:10:38 +08:00
lin onetwo
bfd116a438 feat: generate more rule and tests 2024-08-02 22:54:45 +08:00
lin onetwo
2aff9fecf1 feat: generate more rule and tests 2024-08-01 23:29:48 +08:00
lin onetwo
078967c830 feat: allow recursive 2024-07-30 00:56:28 +08:00
lin onetwo
84e27c05b9 feat: handle tailing \n that may be missing 2024-07-30 00:46:16 +08:00
lin onetwo
1a6a071a29 feat: add rule: 'parseBlock' metadata 2024-07-30 00:43:55 +08:00
lin onetwo
05dec729a0 lint: if 2024-07-30 00:43:40 +08:00
lin onetwo
179651a189 Update codeinline.js 2024-07-29 23:23:47 +08:00
lin onetwo
be3f037a57 refactor: use serialize in rules 2024-06-13 01:34:18 +08:00
lin onetwo
09c2e71e22 feat: two example getText handler 2024-06-13 01:25:23 +08:00
Jeremy Ruston
1a57d08feb Tweak #7866 to omit "rule" property when unset, instead of leaving it null
Also make tests pass
2024-06-08 16:51:00 +01:00
Jeremy Ruston
e4c682d04b Merging #7866: Add start and end properties to WikiText AST nodes
commit 5687d9f44b
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Dec 6 11:33:43 2023 +0800

    Fix for html parser

commit df0a1b184e
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Dec 6 02:47:47 2023 +0800

    Fix HTML AST node boundary parsing in WikiText

commit ac8dda0a1a
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Sat Dec 2 13:02:52 2023 +0800

    update test-wikitext-parser.js, change for-const-of -to .utils.each, add more range attributes

commit e2b9a4ed57
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Nov 29 22:35:39 2023 +0800

    Add more start-end range attributes for AST

commit d3e62ec56a
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Nov 29 20:45:00 2023 +0800

    Add rule attribute for WikiText AST nodes

commit 4200495055
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Nov 29 15:48:38 2023 +0800

    Add start and end properties to AST nodes for list, codeblock, and all other elements
2024-06-08 16:40:20 +01:00
Joshua Fontany
f1299120a6
Block Quotes - fix parsing error with spaces before reEndString (#8186)
* fix parsing error with spaces before reEndString, update docs to clarify block mode inside block quotes.

* additional advanced example

* oops, convert spaces back to tabs.

* reset indentation

* final tabs

* missed some

* wikitext classes are appended to other leading wikitext, no need to skip whitespace here.
2024-05-15 12:25:02 +01:00
btheado
fb85e91f82
Allows whitespace-only macro/procedure to be closed by \end (#7911)
* Added some passing macro definition parsing tests

* Added two failing tests to illustrate bug #3460

* Allow \end to end an whitespace only/empty macro definition. Fixes #3460

* Added some passing procedure definition tests

* Added two failing procedure tests to illustrate bug #3460

* Allow \end to end a whitespace only/empty procedure/function/widget definition. Fixes #3640

* Fixed wording of comment
2024-01-24 11:32:58 +00:00
Jeremy Ruston
a3e5ace458
Remove whitespace immediately after pragmas (#7895)
This is intended to revert some of the behaviour introduced in #7835, see the discussion here: https://github.com/Jermolene/TiddlyWiki5/pull/7888#issuecomment-1856184592
2023-12-21 10:36:45 +00:00
Jeremy Ruston
15e53b8cd1 Revert: #7768 Ensure {{}} doesn't cause a recursion error
See https://github.com/Jermolene/TiddlyWiki5/pull/7768#issuecomment-1850578638
2023-12-11 17:56:11 +00:00
Saq Imtiaz
bf8b3cff03
Fixes Text Parser being impacted by overrides to codeblock widget (#7844)
* fix: overriding codeblock widget should not impact text parser

* fix: whitespace changes
2023-11-20 08:38:04 +00:00
Robin Munn
215bd4e015
Avoid skipping extra whitespace in wikiparser.js (#7835)
When wikiparser parses text looking for a pragma block, it skips
whitespace before looking for the next pragma. If no pragma is found,
we should return the parse position to the original location so that the
skipped whitespace can be parsed as a text node. This allows the
attribute `join=" and "` to parse as " and " rather than "and ".
2023-11-14 22:10:58 +00:00
Jeremy Ruston
b7562f0c7b
Conditional Shortcut Syntax (#7710)
* Initial Commit

* Update docs

* Add support for elseif blocks

* Another test

* WIP

* Change from `{%if%}` to `<%if%>`

See discussion here - https://talk.tiddlywiki.org/t/proposed-if-widget/7882/64

* Don't use the widget body as the template if a list-empty widget is present

See discussion here - https://github.com/Jermolene/TiddlyWiki5/pull/7710#issuecomment-1717193296

* List widget should search recursively for list-template and list-empty

* Allow block mode content within an if/then/else clause

* Update docs

* Add from-version tag to docs
2023-10-14 09:41:21 +01:00
Jeremy Ruston
66a8e2dbf2
Ensure {{}} doesn't generate a transclude widget with no attributes (#7768) 2023-10-07 21:55:39 +01:00