Skip to content

Commit

Permalink
fix(check-examples): properly replace final extension; fixes #1172
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Dec 13, 2023
1 parent caec526 commit b102693
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/checkExamples.js
Expand Up @@ -350,7 +350,7 @@ export default iterateJsdoc(({
if (!filename) {
const jsFileName = context.getFilename();
if (typeof jsFileName === 'string' && jsFileName.includes('.')) {
defaultFileName = jsFileName.replace(/\..*?$/u, `.${ext}`);
defaultFileName = jsFileName.replace(/\.[^.]*$/u, `.${ext}`);
} else {
defaultFileName = `dummy.${ext}`;
}
Expand Down

0 comments on commit b102693

Please sign in to comment.