This commit is contained in:
Offray Vladimir Luna Cárdenas 2021-08-17 12:09:49 -05:00
commit cb79377fac
2 changed files with 29 additions and 2 deletions

View File

@ -17,7 +17,8 @@ Class {
'type',
'list',
'caption',
'modifier'
'modifier',
'wiki'
],
#category : #'TiddlyWiki-Model'
}
@ -130,6 +131,13 @@ Tiddler >> itemContentsStringFor: item into: stream [
nextPut: Character cr
]
{ #category : #accessing }
Tiddler >> linkedTiddlers [
"At the begining we are going to introduce 'pureTiddles' as thos included in the wiki which are not linked
via aliases. Future versions of this method sould included internal aliased tiddlers."
self rawLinks
]
{ #category : #accessing }
Tiddler >> list [
@ -187,6 +195,11 @@ Tiddler >> printOn: aStream [
nextPutAll: '( ', self title, ' )'
]
{ #category : #'as yet unclassified' }
Tiddler >> rawAliasedLinks [
^ self rawLinks select: [ :each | each includesSubstring: '|' ]
]
{ #category : #accessing }
Tiddler >> rawLinks [
^ (WikiTextGrammar new linkSea star parse: self text) asSet
@ -239,3 +252,13 @@ Tiddler >> type: anObject [
type := anObject
]
{ #category : #accessing }
Tiddler >> wiki [
^ wiki
]
{ #category : #accessing }
Tiddler >> wiki: aTiddlyWiki [
wiki := aTiddlyWiki
]

View File

@ -29,7 +29,11 @@ TiddlyWiki >> importJSONTiddlers [
| tiddlersDict |
self tiddlersJSONFile ifNil: [ ^ self ].
tiddlersDict := STONJSON fromString: self tiddlersJSONFile contents.
self tiddlers: (tiddlersDict collect: [:each | Tiddler new fromDictionary: each ])
self tiddlers: (tiddlersDict collect: [:each |
Tiddler new
fromDictionary: each;
wiki: self
])
]
{ #category : #accessing }