build(aio): render ALL code-examples, not just the first
This commit is contained in:

committed by
Pete Bacon Darwin

parent
cda887896a
commit
447e534350
@ -12,7 +12,7 @@ module.exports = function renderExamples(getExampleRegion) {
|
||||
docs.forEach(doc => {
|
||||
if (doc.renderedContent) {
|
||||
// We match either `code-example` or `code-pane` elements that have a path attribute
|
||||
doc.renderedContent = doc.renderedContent.replace(/<(code-example|code-pane)([^>]*)>[^<]*<\/\1>/, (original, element, attributes) => {
|
||||
doc.renderedContent = doc.renderedContent.replace(/<(code-example|code-pane)([^>]*)>[^<]*<\/\1>/g, (original, element, attributes) => {
|
||||
const attrMap = parseAttributes(attributes);
|
||||
if (attrMap.path) {
|
||||
// We found a path attribute so look up the example and rebuild the HTML
|
||||
|
Reference in New Issue
Block a user