diff --git a/lib/swagger-ui-block-macro.js b/lib/swagger-ui-block-macro.js index b8f8c68740..e1c8b859a5 100644 --- a/lib/swagger-ui-block-macro.js +++ b/lib/swagger-ui-block-macro.js @@ -1,7 +1,7 @@ -const buildSwaggerUi = ({ specUrl, bundleUrl }) => ` +const buildSwaggerUi = ({ specUrl, bundleUrl, divID }) => ` -` +var divID = 0; + function blockSwaggerUiMacro ({ file }) { return function () { this.process((parent, specUrl, attrs) => { @@ -64,9 +66,10 @@ function blockSwaggerUiMacro ({ file }) { const bundleUrl = specUrl.startsWith('https://s3.amazonaws.com/cb-docs-swagger/') ? 'https://cb-docs-swagger.s3.amazonaws.com/dist3' : 'https://couchbase-docs.s3.amazonaws.com/assets/swagger-ui-3.7' - const contentScripts = buildSwaggerUi({ specUrl, bundleUrl }) - file.asciidoc.attributes['page-content-scripts'] = contentScripts - return this.createBlock(parent, 'pass', '
') + divID++ + const contentScripts = buildSwaggerUi({ specUrl, bundleUrl, divID }) + file.asciidoc.attributes['page-content-scripts'] += contentScripts + return this.createBlock(parent, 'pass', '') }) } }