-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: serialize AST node back to wikitext string #8258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
37338b1
refactor: extract a new $tw.wiki.getParser
linonetwo 8a12498
feat: allow $tw.utils.getParseTreeText to render other rules' text
linonetwo 09c2e71
feat: two example getText handler
linonetwo a0708a1
Revert "feat: allow $tw.utils.getParseTreeText to render other rules'…
linonetwo f882cbd
refactor: keep original getParseTreeText not touched
linonetwo be3f037
refactor: use serialize in rules
linonetwo 4ddcbc6
Merge remote-tracking branch 'upstream/master' into feat/to-string
linonetwo 4e896d1
refactor: $tw.utils.extend({},options) -> options || {}
linonetwo 179651a
Update codeinline.js
linonetwo 8cbf855
Create test-wikitext-serialize.js
linonetwo a075303
DEBUG: only run my tests for development, remove before PR merge
linonetwo 05dec72
lint: if
linonetwo 1a6a071
feat: add rule: 'parseBlock' metadata
linonetwo 84e27c0
feat: handle tailing \n that may be missing
linonetwo 078967c
feat: allow recursive
linonetwo 2aff9fe
feat: generate more rule and tests
linonetwo bfd116a
feat: generate more rule and tests
linonetwo d067871
fix: remove pragma:true, otherwise following text will become childre…
linonetwo b1667ec
fix: condition manually
linonetwo e49238d
fix: some test
linonetwo 383e1b6
fix: some test
linonetwo 63613ce
feat: $tw.utils.serializeAttribute
linonetwo 7b4ea47
fix: use "" for string param
linonetwo f69795c
feat: list
linonetwo 9df36a2
refactor: ' -> "
linonetwo 2a75077
fix: parsemode don't have node
linonetwo c392976
fix: render invisible comment and parsemode as data element
linonetwo b22ca2b
feat: add void: true, in ast node to prevent render
linonetwo 96adee9
Merge branch 'TiddlyWiki:master' into feat/to-string
linonetwo 5b2c3db
feat: use void widget, so methods always return a widget
linonetwo 7bc408b
feat: ast to use new widget type void
linonetwo 82ae767
test: add rule: 'parseBlock' and isRuleEnd: true
linonetwo 893edf9
lint: quote
linonetwo d6b9d00
Update widget.js
linonetwo 6ac9592
fix: void node need to handle its children
linonetwo 9dbbcef
Update test-wikitext-parser.js
linonetwo e7d4819
lint: quote
linonetwo af2ddaa
Update void.js
linonetwo b8125d1
Update test-wikitext-parser.js
linonetwo 2fa454a
fix: macrodef with comment (void node) not working
linonetwo fb8732a
lint: ' -> "
linonetwo 078cd5f
feat: add to styleblock
linonetwo 7c73f1f
feat: styleblock
linonetwo 43f3f8b
feat: styleinline
linonetwo 856cb42
Update table.js
linonetwo 3cf93d0
lint: useless comments
linonetwo 589241a
feat: transcludeblock
linonetwo 0adf638
refactor: reuse block on inline when possible
linonetwo c4f6136
feat: use void node to carry important info for typedblock
linonetwo 08e9312
feat: run all tests
linonetwo 398d7f7
lint: useless ai generated comments
linonetwo 6580536
Merge remote-tracking branch 'upstream/master' into feat/to-string
linonetwo f5fca2a
Update conditional.js to not include space
linonetwo 043f60b
Update test-wikitext-serialize.js
linonetwo 03798d7
Update conditional.js
linonetwo 58507c0
refactor: move tiddlers to /data
linonetwo 23489ce
refactor: no need for new $tw.Wiki()
linonetwo 1a45520
lint: double quote
linonetwo 4ea8ae4
Merge branch 'feat/to-string' of https://github.com/linonetwo/TiddlyW…
linonetwo 1c50996
refactor: lowercase the parseblock rule name
linonetwo f0babe4
fix: Wiki parser initialize blockRuleClasses only when first new an i…
linonetwo 375df47
feat: restore inline macro def
linonetwo 53296a4
fix: macro in widget param
linonetwo 72dd18d
fix: positional attribute in macro call
linonetwo fb9f7a5
fix: table space and horizrule block new line
linonetwo 47cc03d
feat: make sure block rule all have \n\n for visiblity
linonetwo 8056d8c
lint: function param
linonetwo 0f38567
fix: empty list item
linonetwo f220dac
feat: add \n\n based on isBlock, if could also be inline
linonetwo 5fdc9f3
fix: conditional without elseif
linonetwo 87dc05b
refactor: use isBlock in macrodef to know inline or block
linonetwo 2765e99
fix: link may not have attribute and children
linonetwo 069181d
DEBUG: render result and diff below body only on browser
linonetwo 86ec4ca
fix: remove pad space in />
linonetwo 74c9841
test: remove pad space in />
linonetwo 8ab1273
Revert DEBUG: render result and diff below body only on browser
linonetwo 711bf01
refactor: fold commentText variable
linonetwo 5c0198b
refactor: fold long comment
linonetwo a97aede
fix: double quotes for parameter values
linonetwo 22749bb
Merge remote-tracking branch 'upstream/master' into feat/to-string
linonetwo 7c6c0c3
Update void.js
linonetwo 022b70d
Merge branch 'master' into feat/to-string
linonetwo 1d3ec9b
refactor: move all exports.serialize = function(tree,serialize) { to …
linonetwo e07aca9
fix: expost listTypes from core, and require it in plugin
linonetwo 8dac433
refactor: move serializeWikitextParseTree to plugin and init it
linonetwo 2fea1c7
refactor: move serializeAttribute util also to the plugin
linonetwo f40a0ac
fix: Delete unused file
linonetwo 5dc3e31
Merge branch 'master' into feat/to-string
linonetwo 3da7564
Update macrodef.js
linonetwo 0b40531
Update test-wikitext-parser.js
linonetwo a483074
Merge remote-tracking branch 'upstream/master' into feat/to-string
linonetwo 79822f2
lint: fix
linonetwo a91fa06
Update plugins/tiddlywiki/wikitext-serialize/rules/filteredtransclude…
linonetwo 82c2ad3
Update core/modules/widgets/void.js
linonetwo 821e961
Update plugins/tiddlywiki/wikitext-serialize/rules/list.js
linonetwo c26564c
Update plugins/tiddlywiki/wikitext-serialize/rules/list.js
linonetwo 163b8cf
Update plugins/tiddlywiki/wikitext-serialize/rules/styleblock.js
linonetwo e6d517b
Remove unused methods from VoidNodeWidget
linonetwo 99ee212
docs: about regex in styleinline.js
linonetwo 15c2a75
Merge remote-tracking branch 'upstream/master' into feat/to-string
linonetwo 756d657
Update parsetree.js
linonetwo 8cbd6c2
Update core/modules/widgets/void.js
linonetwo 423973c
feat: Ensure at least one space after the style/class
linonetwo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,3 +42,5 @@ exports.parse = function() { | |
| this.parser.pos = call.end; | ||
| return [call]; | ||
| }; | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,3 +113,5 @@ exports.parseLink = function(source,pos) { | |
| node.end = closePos + 2; | ||
| return node; | ||
| }; | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.