Skip to content

fix: avoid loading examples from a similarly named component

Paul Gascou-Vaillancourt requested to merge fix-examples-loading into master

This fixes an issue where a component's examples would be loaded from another similarly named component.

For example, in https://design.gitlab.com/components/accordion/code, we currently load examples from GlAccordionItem instead of GlAccordion. That's because both components' name starts with GlAccordion, and GlAccordionItem is matched before GlAccordion with the current examples loading logic.

This fixes this by matching the exact module name which should be formed of the component's name followed by Documentation.

Closes #779 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports