Merge fb433bfaef
This commit is contained in:
commit
43a9450122
@ -11,13 +11,13 @@ Class {
|
|||||||
'title',
|
'title',
|
||||||
'text',
|
'text',
|
||||||
'modified',
|
'modified',
|
||||||
'mofier',
|
|
||||||
'created',
|
'created',
|
||||||
'creator',
|
'creator',
|
||||||
'tags',
|
'tags',
|
||||||
'type',
|
'type',
|
||||||
'list',
|
'list',
|
||||||
'caption'
|
'caption',
|
||||||
|
'modifier'
|
||||||
],
|
],
|
||||||
#category : #'TiddlyWiki-Model'
|
#category : #'TiddlyWiki-Model'
|
||||||
}
|
}
|
||||||
@ -133,15 +133,15 @@ Tiddler >> modified: anObject [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Tiddler >> mofier [
|
Tiddler >> modifier [
|
||||||
|
|
||||||
^ mofier
|
^ modifier
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Tiddler >> mofier: anObject [
|
Tiddler >> modifier: anObject [
|
||||||
|
|
||||||
mofier := anObject
|
modifier := anObject
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
@ -16,3 +16,30 @@ WikiText >> content [
|
|||||||
WikiText >> content: aString [
|
WikiText >> content: aString [
|
||||||
content := aString
|
content := aString
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #conversions }
|
||||||
|
WikiText >> converMarkdownBold [
|
||||||
|
self content: (self content copyReplaceAll: '**' with: '''''').
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #conversions }
|
||||||
|
WikiText >> convertMarkdownBold [
|
||||||
|
self content: (self content copyReplaceAll: '**' with: '''''').
|
||||||
|
^ self.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #conversions }
|
||||||
|
WikiText >> convertMarkdownLinks [
|
||||||
|
| markdownLinks markdownLinksRegex |
|
||||||
|
markdownLinksRegex := '\[([\w|\s]+)\]\((\S+)\)'.
|
||||||
|
"For the explanation of the Regex details see: http://scottradcliff.com/how-to-parse-urls-in-markdown.html"
|
||||||
|
markdownLinks := self content regex: markdownLinksRegex matchesCollect: [:link | link ].
|
||||||
|
markdownLinks ifEmpty: [ ^ self ].
|
||||||
|
markdownLinks do: [:markdownLink | | linkText closingLinkIndex newContent |
|
||||||
|
closingLinkIndex := markdownLink indexOf: $].
|
||||||
|
linkText := markdownLink copyFrom: 2 to: closingLinkIndex.
|
||||||
|
newContent := self content copyReplaceAll: markdownLink with: '[[', linkText, ']'.
|
||||||
|
self content: newContent.
|
||||||
|
].
|
||||||
|
^ self
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user