Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Next write a nice test!
  • Loading branch information
Ducasse committed Oct 2, 2022
1 parent 5b34948 commit 92060ff
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Microdown/MicRootBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ MicRootBlock >> properties: aConfigurationForPillar [
MicRootBlock >> transformDocumentFor: aPRPDFDocument [
"This is a hook to be able to have framework specific transformation hooks.
see PRAbstractOutputDocument>>#buildOn:"

^ aPRPDFDocument transformDocument: (self resolveFrom: aPRPDFDocument project baseDirectory asMicResourceReference )
"Note that the resolution is made against the currently transformed file and not the base directory of the project else we may lose the fact that a figure is within multiple folders within the base project.
Compare
/base and
/base/Chapters/Chapter1/FileContainingAReferenceToFigures.md
When resolving figures/myPng referenced from within FileContainingAReferenceToFigures.md
we should get /base/Chapters/Chapter1/figures/myPng!
Using base we lose Chapters/Chapter1 and only get /base/figures/myPng.
"
^ aPRPDFDocument transformDocument: (self resolveFrom: aPRPDFDocument file file asMicResourceReference )
]

0 comments on commit 92060ff

Please sign in to comment.