Problem: Javascript object literal is not indented correctly.
Solution: Make a special case for when "J1" is in 'cino'. (Luc Deschenaux)
* ldfd) {
* }
*/
- if ((ind_keep_case_label
+ if (ind_js || (ind_keep_case_label
&& cin_iscase(skipwhite(ml_get_curline()), FALSE)))
amount = get_indent();
else
STARTTEST
:set cino=N-s
-/namespaces
+/^NAMESPACESTART
=/^NAMESPACEEND
ENDTEST
+NAMESPACESTART
/* valid namespaces with normal indent */
namespace
{
NAMESPACEEND
+STARTTEST
+:set cino=J1
+/^JSSTART
+=/^JSEND
+ENDTEST
+
+JSSTART
+var bar = {
+foo: {
+that: this,
+some: ok,
+},
+"bar":{
+a : 2,
+b: "123abc",
+x: 4,
+"y": 5
+}
+}
+JSEND
+
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/start of AUTO/,$wq! test.out
}
+NAMESPACESTART
/* valid namespaces with normal indent */
namespace
{
NAMESPACEEND
+
+JSSTART
+var bar = {
+ foo: {
+ that: this,
+ some: ok,
+ },
+ "bar":{
+ a : 2,
+ b: "123abc",
+ x: 4,
+ "y": 5
+ }
+}
+JSEND
+
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 213,
/**/
212,
/**/