Skip to content

Commit

Permalink
js-mode: mark object properties properly
Browse files Browse the repository at this point in the history
- fixes bug where a comma inside a string messed it up
  • Loading branch information
magnars committed Sep 4, 2013
1 parent 2fd8a0e commit 3c7e457
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js-mode-expansions.el
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ If point is inside the value, that will be marked first anyway."
(backward-char)
(set-mark (point))
(search-forward ":")
(while (not (looking-at "[},]"))
(while (or (not (looking-at "[},]"))
(er--point-inside-string-p))
(if (looking-at "\\s(")
(forward-list)
(forward-char)))
Expand Down

0 comments on commit 3c7e457

Please sign in to comment.