SteveSanderson/knockout — pull request #561 by cowov (2012-07-07 19:44:12+00:00)
Title: Allow newlines in virtual elements

Currently newlines are allowed only at the very end of the comment (due to `\s*-->$` and `\s*$` in `startCommentRegex`). However, inline newlines can greatly increase readability in some cases, such as for template bindings with long arguments.

The proposed change replaces each `.` with `(?:.|\n)`, but obviously any other "any character" clause would also work. The trailing `\s*`, which previously could have matched a newline followed by any other whitespace, is removed as it no longer serves any purpose.

Allowing newlines in virtual elements is also in agreement with ordinary data-bindings, where newlines in the attribute values to `data-bind` are allowed.