AlaskaAirlines / WC-Generator

Auro's automated web component generator
https://auro.alaskaair.com/getting-started/developers/generator/install
Apache License 2.0
5 stars 9 forks source link

generateDocs.js is too aggressive with replacement of "[name]" #413

Closed jason-capsule42 closed 1 year ago

jason-capsule42 commented 1 year ago

Please verify the version of wc-generator you have installed

No response

Please describe the bug

Any component that has a name attribute that appears in the api.md is getting replaced improperly with the name of component.

apiExamples.md converts attribute names to links. Use an example component like checkbox: when an attribute is called name rather than generating [name](url for link) the [name] portion gets replaced and you end up with checkbox(url for link) which is not correct syntax for a markdown link.

Reproducing the error

None

Expected behavior

markdown link should be valid after script execution

What browsers are you seeing the problem on?

No response

Additional context

This ticket needs to be addressed once this one is good.

Exit criteria

update the generateDocs.js script such that where it replaces [name] and [Name] to ignores those that are followed by a ( character. This will prevent it from replacing links with the title of name. This will be done by correcting the regex that defines which sections to replace.