Skip to content
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

The markup parser doesn't correctly determine nextParserIndex in most usecases #75

Open
erikhagreis opened this issue May 27, 2016 · 2 comments
Assignees
Labels

Comments

@erikhagreis
Copy link

erikhagreis commented May 27, 2016

The markup parser (as prototype of any multi-line parser) does not correctly determine the end of the current multi-line comment segment.

This is the problematic code:

// find the next instance of a parser (if there is one based on the @ symbol)
// in order to isolate the current multi-line parser
var nextParserIndex = block.indexOf('* @', i+1),

I think the indexOf('* @') call assumes a situation where comments are written in the following style example:

/**
 * @markup
 * <button>click</button>
 *
 * @state :hover - When mouse rolls over
 */

If this style of commenting (with leading *'s each line) is not followed, the nextParserIndex will not be detected and the markup section is assumed to last the rest of the comment block. Adding parseable lines below a markup section like in the example above will result in those lines being included in the markup.

@erikhagreis
Copy link
Author

@darcyclarke: if you want I can propose a pull request to fix this issue (but it would require some discussion regarding the correct approach)

@darcyclarke darcyclarke self-assigned this May 27, 2016
@pauljeter
Copy link

Has there been any movement on this? I am also willing to contribute if you have a direction that you are wanting to move in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants