Integrating all changes in image 0.8.690
This commit is contained in:
parent
43a9450122
commit
d7cc181014
@ -34,12 +34,12 @@ WikiText >> convertMarkdownLinks [
|
|||||||
markdownLinksRegex := '\[([\w|\s]+)\]\((\S+)\)'.
|
markdownLinksRegex := '\[([\w|\s]+)\]\((\S+)\)'.
|
||||||
"For the explanation of the Regex details see: http://scottradcliff.com/how-to-parse-urls-in-markdown.html"
|
"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 := self content regex: markdownLinksRegex matchesCollect: [:link | link ].
|
||||||
markdownLinks ifEmpty: [ ^ self ].
|
markdownLinks ifEmpty: [ ^ self content ].
|
||||||
markdownLinks do: [:markdownLink | | linkText closingLinkIndex newContent |
|
markdownLinks do: [:markdownLink | | linkText closingLinkIndex newContent |
|
||||||
closingLinkIndex := markdownLink indexOf: $].
|
closingLinkIndex := markdownLink indexOf: $].
|
||||||
linkText := markdownLink copyFrom: 2 to: closingLinkIndex.
|
linkText := markdownLink copyFrom: 2 to: closingLinkIndex.
|
||||||
newContent := self content copyReplaceAll: markdownLink with: '[[', linkText, ']'.
|
newContent := self content copyReplaceAll: markdownLink with: '[[', linkText, ']'.
|
||||||
self content: newContent.
|
self content: newContent.
|
||||||
].
|
].
|
||||||
^ self
|
^ self content
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user