diff options
Diffstat (limited to 'server/sonar-docs/src/templates/page.js')
-rw-r--r-- | server/sonar-docs/src/templates/page.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/server/sonar-docs/src/templates/page.js b/server/sonar-docs/src/templates/page.js index d627cd7a338..12d16defb24 100644 --- a/server/sonar-docs/src/templates/page.js +++ b/server/sonar-docs/src/templates/page.js @@ -46,13 +46,10 @@ export default class Page extends React.PureComponent { render() { const page = this.props.data.markdownRemark; - let htmlWithInclusions = page.html.replace(/<p>@include (.*)<\/p>/, (_, path) => { - const chunk = data.allMarkdownRemark.edges.find(edge => edge.node.fields.slug === path); - return chunk ? chunk.node.html : ''; - }); const realHeadingsList = removeExtraHeadings(page.html, page.headings); + let htmlWithInclusions = page.html; htmlWithInclusions = removeTableOfContents(htmlWithInclusions); htmlWithInclusions = createAnchorForHeadings(htmlWithInclusions, realHeadingsList); htmlWithInclusions = replaceDynamicLinks(htmlWithInclusions); |