Starting importation of Markdeep objects from files.
This commit is contained in:
parent
06ccc84c29
commit
004b286835
src/MiniDocs
@ -158,6 +158,23 @@ Markdeep >> converPubPubFootnoteBetween: footnote and: nextFootnote in: footnote
|
||||
^ response contents
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Markdeep >> file: aFileReference [
|
||||
file := aFileReference.
|
||||
self fillInContentsFrom: aFileReference
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Markdeep >> fillInContentsFrom: aFileReference [
|
||||
| docTree headTree |
|
||||
docTree := (Markdown new contents: aFileReference contents) documentTree.
|
||||
headTree := (docTree children
|
||||
detect: [ :node |
|
||||
node className = 'PPCMParagraph'
|
||||
and: [ (node children detect: [ :subnode | subnode text = '<head>' ]) isNotNil ] ]).
|
||||
^ headTree
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Markdeep >> folder [
|
||||
^ self file parent
|
||||
@ -199,8 +216,11 @@ Markdeep >> gtTextFor: aView [
|
||||
|
||||
{ #category : #accessing }
|
||||
Markdeep >> head [
|
||||
^ head ifNil: [ head := OrderedCollection new.
|
||||
head add: self fontAwesomeHeader; yourself ]
|
||||
|
||||
^ head ifNil: [
|
||||
head := OrderedCollection new.
|
||||
head add: self fontAwesomeHeader; yourself.
|
||||
].
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
@ -103,6 +103,7 @@ Markdown >> detectYAMLMetadata [
|
||||
{ #category : #accessing }
|
||||
Markdown >> documentTree [
|
||||
| parser|
|
||||
self contents ifNil: [^ nil].
|
||||
parser := PPCommonMarkBlockParser new parse: self contents.
|
||||
^ parser accept: CMBlockVisitor new
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user