Add Block_comments to skipped token types

This commit is contained in:
Liam Newman 2013-10-11 15:19:23 -07:00
parent f1648d3c2a
commit d0d79c9154
2 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@
// Just continue formatting and the behavior should be logical.
// Also ignore unknown tokens. Again, this should result in better behavior.
if (token_type !== 'TK_INLINE_COMMENT' && token_type !== 'TK_COMMENT' &&
token_type !== 'TK_UNKNOWN') {
token_type !== 'TK_BLOCK_COMMENT' && token_type !== 'TK_UNKNOWN') {
last_last_text = flags.last_text;
last_type = token_type;
flags.last_text = token_text;

View File

@ -329,7 +329,7 @@ class Beautifier:
# The cleanest handling of inline comments is to treat them as though they aren't there.
# Just continue formatting and the behavior should be logical.
if token_type != 'TK_INLINE_COMMENT' and token_type != 'TK_COMMENT' and token_type != 'TK_UNKNOWN':
if token_type != 'TK_INLINE_COMMENT' and token_type != 'TK_COMMENT' and token_type != 'TK_BLOCK_COMMENT' and token_type != 'TK_UNKNOWN':
self.last_last_text = self.flags.last_text
self.last_type = token_type
self.flags.last_text = self.token_text