-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when providing old apidoc apiExample syntax #4
Comments
I'm not familiar with this |
with old syntax, I mean the standard syntax, without the plugin. see http://apidocjs.com/#param-api-example |
Bump. This plugin does not allow to mix
|
The bug is because function parse(content) {
// ...
if ( ! matches)
return null;
// ...
} Recommended solution is to check if function parserExampleElements(elements, element, block, filename) {
// ...
const values = elementParser.parse(element.content, element.source);
if (!values) { // < ----------------- Should check if values null --------
return elements
}
// ....
} |
Should probably also make the regex more specific, since only I suggest changing var parseRegExp = /^\{(.+?)=(.+?)\}\s*(?:\s+(.+?))?\s(.+?)$/g; ...to var parseRegExp = /^\{\s*(json|jsonschema|xml)\s*=(.+?)\}\s*(?:\s+(.+?))?\s(.+?)$/g; |
@Arxcis nice catch, would you like to put a PR together for that? |
@willfarrell Alright, will do. I am not sure if just returning |
… on json|jsonschema|xml
- This makes it possible to play more nicely with other plugins like {curl=example}
Hi, is this merged with the npm version? Thank you, |
hey there,
thx for the plugin.
when i mix old and new syntax in different blocks, I get error:
error: Cannot read property 'path' of null
Code:
The text was updated successfully, but these errors were encountered: