From fecbd57f16f48fab69e4d4bbad2d1ecb1e1654f8 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Wed, 20 Oct 2021 09:29:35 -0500 Subject: [PATCH] Fixing bug when tiddlers have no text. --- repository/TiddlyWiki/Tiddler.class.st | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/repository/TiddlyWiki/Tiddler.class.st b/repository/TiddlyWiki/Tiddler.class.st index c6a2a78..5f5dd77 100644 --- a/repository/TiddlyWiki/Tiddler.class.st +++ b/repository/TiddlyWiki/Tiddler.class.st @@ -212,6 +212,7 @@ Tiddler >> linkedTiddlers [ "At the begining we are going to introduce 'pureTiddlers' as thos included in the wiki which are not linked via aliases. Future versions of this method sould included internal aliased tiddlers." | pureTiddlersTitles | + self rawLinks ifNil: [ ^nil ]. pureTiddlersTitles := self rawLinks difference: self rawAliasedLinks. ^ self wiki tiddlers select: [:tiddler | pureTiddlersTitles includes: tiddler title ]. ] @@ -295,13 +296,14 @@ Tiddler >> printOn: aStream [ nextPutAll: '( ', self title, ' )' ] -{ #category : #'as yet unclassified' } +{ #category : #accessing } Tiddler >> rawAliasedLinks [ ^ self rawLinks select: [ :each | each includesSubstring: '|' ] ] { #category : #accessing } Tiddler >> rawLinks [ + self text ifNil: [ ^ Set new ]. ^ (WikiTextGrammar new linkSea star parse: self text) asSet ]