Skip to content

Commit

Permalink
Merge pull request #571 from Ducasse/570-Fix-for-bad-resolution-when-…
Browse files Browse the repository at this point in the history
…compiling-separated-file-httpsgithubcompillar-markuppillarissues574

Fix: #570 and  pillar-markup/pillar#574
  • Loading branch information
Ducasse authored Oct 2, 2022
2 parents 5b34948 + 92060ff commit 2a670a9
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 2a670a9

Please sign in to comment.