Text formating for link list coming from Brave.
This commit is contained in:
parent
c1b4c3e90b
commit
ffa7ca5f3d
@ -574,6 +574,24 @@ Tiddler >> renumberWihtMarkup [
|
||||
self text: response contents
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Tiddler >> replaceRawLinksListWithNamedLinks [
|
||||
| response |
|
||||
response := '' writeStream.
|
||||
self text lines do: [:line | | lineSegments webLink |
|
||||
lineSegments := line splitOn: Character space.
|
||||
webLink := lineSegments second asUrl.
|
||||
webLink host isNil
|
||||
ifTrue: [ response nextPutAll: line; cr ]
|
||||
ifFalse: [ | linkTitle|
|
||||
linkTitle := ((XMLHTMLParser parse: webLink retrieveContents) xpath: '/html/head/title')
|
||||
firstElement contentString.
|
||||
response nextPutAll: '# [[', linkTitle, '|', webLink asString, ']]'; cr
|
||||
]
|
||||
].
|
||||
self text: response contents
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Tiddler >> revision [
|
||||
^ revision
|
||||
|
Loading…
Reference in New Issue
Block a user