Skip to content

Commit

Permalink
Add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Oct 3, 2023
1 parent 29310b4 commit 56d90e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/features/antora/antoraSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ export async function findAntoraConfigFile (textDocumentUri: Uri): Promise<Uri |
for (const antoraConfigUri of antoraConfigUris) {
const antoraConfigParentDirPath = antoraConfigUri.path.slice(0, antoraConfigUri.path.lastIndexOf('/'))
const modulesDirPath = `${antoraConfigParentDirPath}/modules`
console.log('DEBUG// asciidocFilePath.startsWith(modulesDirPath): ' + asciidocFilePath.startsWith(modulesDirPath))
console.log('DEBUG// asciidocFilePath.slice(modulesDirPath.length): ' + asciidocFilePath.slice(modulesDirPath.length))
console.log('DEBUG// asciidocFilePath.slice(modulesDirPath.length).match(/^\\/[^/]+\\/pages\\/.*/): ' + asciidocFilePath.slice(modulesDirPath.length).match(/^\/[^/]+\/pages\/.*/))
if (asciidocFilePath.startsWith(modulesDirPath) && asciidocFilePath.slice(modulesDirPath.length).match(/^\/[^/]+\/pages\/.*/)) {
console.log(`Found an Antora configuration file at ${antoraConfigUri.toString()} for the AsciiDoc document ${asciidocFilePath}`)
return antoraConfigUri
Expand Down

0 comments on commit 56d90e2

Please sign in to comment.