electron / electron-docs-linter

Parse and validate Electron's API documentation
http://npm.im/electron-docs-linter
21 stars 24 forks source link

fix: parsing error logging `[object Object]` #113

Closed samuelmaddock closed 5 years ago

samuelmaddock commented 5 years ago

Came across this issue running npm run create-api-json in the electron repo.

Instead of the output saying

problem parsing parameters
parameterPattern: /<code>((?:...)?\w+?)<\/code>\s*(\(?(?:(?:(?:<a href.*?>)?[a-zA-Z0-9[\]]+(?:<(?:[a-zA-Z[\]]+(?: \| )?)+>)?(?:<\/a>)?(?: \| )?)+)\)?(?:\[])?)(?: - )?([\s\S]*)/m
el: [object Object]

It will now say something like

problem parsing parameters
parameterPattern: /<code>((?:...)?\w+?)<\/code>\s*(\(?(?:(?:(?:<a href.*?>)?[a-zA-Z0-9[\]]+(?:<(?:[a-zA-Z[\]]+(?: \| )?)+>)?(?:<\/a>)?(?: \| )?)+)\)?(?:\[])?)(?: - )?([\s\S]*)/m

Returns Promise<NativeImage> - Resolves with a NativeImage
MarshallOfSound commented 5 years ago

Nice change 👍