Adding more views to Markdown document tree elements.
This commit is contained in:
parent
b7a82ab374
commit
18bdabdb59
@ -55,6 +55,13 @@ HedgeDoc >> defaultServer [
|
||||
self server: 'https://docutopia.tupale.co'.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
HedgeDoc >> documentTree [
|
||||
| parser|
|
||||
parser := PPCommonMarkBlockParser new parse: self contents.
|
||||
^ parser accept: CMBlockVisitor new
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
HedgeDoc >> htmlUrl [
|
||||
| link |
|
||||
|
@ -181,10 +181,7 @@ LePage >> options [
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LePage >> preorderTraversal [
|
||||
| output |
|
||||
output := OrderedCollection new.
|
||||
self withDeepCollect: [:each | each allChildrenBreadthFirstDo: [:child | output add: child]].
|
||||
^ output.
|
||||
^ self allChildrenDepthFirst
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
|
@ -21,3 +21,27 @@ PPCMHrule >> rule [
|
||||
PPCMHrule >> rule: anObject [
|
||||
rule := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
PPCMHrule >> viewBody [
|
||||
|
||||
| aText |
|
||||
aText := (self className ,' ',
|
||||
self rule) asRopedText.
|
||||
|
||||
self children do: [ :child |
|
||||
aText append: ' ' asRopedText.
|
||||
aText append: (child destination asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor).
|
||||
aText append: ('= "' asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor).
|
||||
aText append: (child destination asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor).
|
||||
aText append:
|
||||
('"' asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor)
|
||||
].
|
||||
|
||||
|
||||
^ aText
|
||||
]
|
||||
|
@ -21,3 +21,20 @@ PPCMLinkRef >> label [
|
||||
PPCMLinkRef >> label: anObject [
|
||||
label := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
PPCMLinkRef >> viewBody [
|
||||
|
||||
| aText |
|
||||
aText := (self className ,' ',
|
||||
self label text) asRopedText.
|
||||
|
||||
self children do: [ :child |
|
||||
aText append: ' ' asRopedText.
|
||||
aText append: (child className asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor)
|
||||
].
|
||||
|
||||
|
||||
^ aText
|
||||
]
|
||||
|
@ -48,3 +48,27 @@ PPCMLinkRefDef >> title [
|
||||
PPCMLinkRefDef >> title: anObject [
|
||||
title := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
PPCMLinkRefDef >> viewBody [
|
||||
|
||||
| aText |
|
||||
aText := (self className ,' ',
|
||||
self label text, ' -> ', self destination) asRopedText.
|
||||
|
||||
self children do: [ :child |
|
||||
aText append: ' ' asRopedText.
|
||||
aText append: (child destination asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor).
|
||||
aText append: ('= "' asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor).
|
||||
aText append: (child destination asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor).
|
||||
aText append:
|
||||
('"' asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor)
|
||||
].
|
||||
|
||||
|
||||
^ aText
|
||||
]
|
||||
|
@ -13,3 +13,19 @@ PPCMLinkRefDefPlaceholder >> accept: visitor [
|
||||
PPCMLinkRefDefPlaceholder >> isBlockLevel [
|
||||
^ true
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
PPCMLinkRefDefPlaceholder >> viewBody [
|
||||
|
||||
| aText |
|
||||
aText := (self className ) asRopedText.
|
||||
|
||||
self children do: [ :child |
|
||||
aText append: ' ' asRopedText.
|
||||
aText append: (child className asRopedText foreground:
|
||||
BrGlamorousColors disabledButtonTextColor).
|
||||
].
|
||||
|
||||
|
||||
^ aText
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user