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

Block comments and configurable 'ignore this comment' flag #83

Merged
merged 1 commit into from Aug 19, 2013
Merged

Block comments and configurable 'ignore this comment' flag #83

merged 1 commit into from Aug 19, 2013

Conversation

kmdavis
Copy link
Collaborator

@kmdavis kmdavis commented May 20, 2013

This commit adds the ability to define a block comment syntax
for individual languages (currently, only javascript -- I'm lazy)
Similar to singleLineComment, multiLineComment is an array, however,
unlike singleLineComment, it is not an array of alternatives; order
matters. multiLineComment[0] opens a block comment, [2] closes it
and [1] is an optional beginning of line marker, ex:

/*

  • This is a block comment
    */

/* is the opener, */ is the closer, and * is a line marker

A line marker can also succeed or preceed an opener/closer, e.g.:

/**

  • Foo
    **/

Additionally, you can use block syntax on a single line:

/* This is a single line comment */

This opens up the possibility of adding additional languages
that only have block comments, like HTML or Handlebars

EDIT: Additionally, this commit makes the 'ignore this comment' flag configurable, since the default ( '}' ) wouldn't be very friendly in Handlebars or Mustache, where '}' is part of the language

This commit adds the ability to define a block comment syntax
for individual languages (currently, only javascript -- I'm lazy)
Similar to singleLineComment, multiLineComment is an array, however,
unlike singleLineComment, it is not an array of alternatives; order
matters.  multiLineComment[0] opens a block comment, [2] closes it
and [1] is an optional beginning of line marker, ex:

/*
 * This is a block comment
 */

/* is the opener, */ is the closer, and * is a line marker

A line marker can also succeed or preceed an opener/closer, e.g.:

/**
 * Foo
 **/

Additionally, you can use block syntax on a single line:

/* This is a single line comment */

This opens up the possibility of adding additional languages
that only have block comments, like HTML or Handlebars
kmdavis pushed a commit that referenced this pull request Aug 19, 2013
…bac9

Block comments and configurable 'ignore this comment' flag
@kmdavis kmdavis merged commit 3087df1 into nevir:master Aug 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant