Adding more views to Markdown document tree elements.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-04-06 08:47:40 -05:00
parent b7a82ab374
commit 18bdabdb59
6 changed files with 89 additions and 4 deletions

View File

@ -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 |

View File

@ -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' }

View File

@ -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
]

View File

@ -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
]

View File

@ -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
]

View File

@ -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
]