Skip to content

Commit f9bc920

Browse files
committed
Do not include code blocks in transclusions extraction
Any transclusion done inside a code block, like `{{Example}}` or ``` {{Example}} ``` Is not considered when extracting transclusion patterns from the text body.
1 parent 9eed10f commit f9bc920

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/shiraz/viewtemplates/$__plugins_kookma_viewtemplates_node-explorer.tid

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ type: text/vnd.tiddlywiki
77

88
\define back-transclusion-pattern() {{\s*$(currentTiddler)$((\s*\|{2}[^{^}]+)|(!{2}[^\{^\}]+)|)}}
99
\define escapechars-pattern() ([\?\.\*\+\(\)\$\^\\])
10+
\define code-pattern() `[\s\S]+`
1011

1112
<!-- transclusion of current tiddler by other tiddlers -->
1213
\define back-transclusion-filter()
@@ -17,7 +18,7 @@ type: text/vnd.tiddlywiki
1718

1819
<!-- transclusion of other tiddlers in the current tiddler -->
1920
\define transclusion-filter()
20-
[all[current]get[text]splitregexp[\n]unique[]split[{{]butfirst[]]
21+
[all[current]get[text]search-replace:g:regexp<code-pattern>,[]splitregexp[\n]unique[]split[{{]butfirst[]]
2122
:filter[!prefix[{]search:title[}}]]
2223
:map[split[}}]first[]trim[]]
2324
:map[split[!!]first[]trim[]]

0 commit comments

Comments
 (0)