Skip to content

Commit

Permalink
fixing headerlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed Jun 24, 2024
1 parent b7c3984 commit 06e464b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/Microdown-Blog/MicBlogCreator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ MicBlogCreator >> createAllHtmlFile [

"Create _monthListBlog"
listOfSingleSummary := allFileParse collect: [ :each |
MicSingleSummarizer new summarize: each ].
MicSingleSummarizer new
targetDirectory: targetDirectory;
summarize: each ].
self initializeMonthList: listOfSingleSummary.

"transform all markdown file into html file"
Expand Down
12 changes: 5 additions & 7 deletions src/Microdown-Blog/MicSingleSummarizer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@ MicSingleSummarizer >> firstParagraphBlockOf: aMicRootBlock [
{ #category : 'parsing' }
MicSingleSummarizer >> headerLink: aMicRootBlock [

| headerLink header disk |
| headerLink header path |
headerLink := MicHeaderBlock new.
header := self firstHeaderBlockOf: aMicRootBlock.

(aMicRootBlock fromFile fileSystem store isKindOf: WindowsStore) ifTrue: [
disk := 'File:///' , aMicRootBlock fromFile fileSystem store currentDisk ].
disk ifNil: [ disk := '' ].

path := (aMicRootBlock fromFile withoutExtension fullName
withoutPrefix: targetDirectory fullName) , '.html'.

headerLink
addChild:
(self makeALink: header text to: disk, aMicRootBlock fromFile fullName);
addChild: (self makeALink: header text to: path);
level: header level.

^ headerLink
Expand Down

0 comments on commit 06e464b

Please sign in to comment.