Skip to content

Commit afe5479

Browse files
fix: In generated doccumentation adding examples to the method that are for other methods (#273)
1 parent 21b8484 commit afe5479

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/macrofier/engine.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,6 +1794,10 @@ function insertExampleMacros(template, examples, method, json, templates) {
17941794

17951795
let index = -1
17961796
Object.keys(examples).forEach(key => {
1797+
// if the key is not the method name, skip it, we don't want to include examples for other methods
1798+
if (key != method.name) {
1799+
return;
1800+
}
17971801
examples[key].forEach(example => {
17981802
index++
17991803
let code = getTemplate('/codeblocks/example', templates)

0 commit comments

Comments
 (0)