diff --git a/src/proxy-page/steps/fixDrawio.ts b/src/proxy-page/steps/fixDrawio.ts index f150b8b87..15e2a1e24 100644 --- a/src/proxy-page/steps/fixDrawio.ts +++ b/src/proxy-page/steps/fixDrawio.ts @@ -15,13 +15,27 @@ export default (config: ConfigService): Step => { const thisBlock = $(element).html(); if (thisBlock) { // Finding a block with the pattern diagramDisplayName= is enought the determine the name of the file - const foundBlock = thisBlock.match(/diagramDisplayName=s*([^|]*)/g); + // const foundBlock = thisBlock.match(/diagramDisplayName=s*([^|]*)/g); + const foundBlock = thisBlock.match( + /pageId=s*([^|]*)|diagramDisplayName=s*([^|]*)/g, + ); if (foundBlock) { + // $(element).prepend( + // `
${foundBlock[0]}
`, + // ); $(element).prepend( - `
${foundBlock[0]}
`, + `
${foundBlock[1]}
`, ); } } diff --git a/tests/unit/steps/fixDrawio.spec.ts b/tests/unit/steps/fixDrawio.spec.ts index 0208f88e7..ec860cf15 100644 --- a/tests/unit/steps/fixDrawio.spec.ts +++ b/tests/unit/steps/fixDrawio.spec.ts @@ -15,7 +15,7 @@ const example = `` + ``; -const image0 = `diagramDisplayName=Test Styles Content Confluence.drawio`; +const image0 = `diagramDisplayName=Test Styles Content Confluence.drawio`; const image1 = `diagramDisplayName=MS-Whispr-iObeya-Architecture`; describe('ConfluenceProxy / fixDrawio', () => {