最后一个括号→}变成红色而不是绿色,但是脚本正常工作(Google App脚本) [英] Last brace → } are turning red instead of green, but the script works normally (Google App Script)

查看:76
本文介绍了最后一个括号→}变成红色而不是绿色,但是脚本正常工作(Google App脚本)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我选择脚本的最后一个大括号时,它看起来像这样:

When I select the last brace of the script, it looks like this:

从逻辑上讲,它必须显示为绿色以确认一切正确,例如:

Logically, it has to appear green to confirm that everything is correct, such as this:

但是脚本运行到最后没有错误,如果脚本太大或脚本中有任何错误,这是正常现象吗?

But the script runs to the end without error, is it normal to happen when the script is too large or has any errors in the script?

换句话说,最后一个花括号在选择时是否一定要变成绿色?

In other words, does the last brace necessarily have to turn green when selecting it?

推荐答案

这是Apps脚本代码编辑器中的几个错误之一.超过大约100行的任何代码都不会以绿色显示匹配的最外面的大括号.关闭功能块内的花括号 会正确显示结尾匹配的花括号,颜色为绿色.该错误似乎只影响功能块本身的结尾花括号.

This is one of a few bugs in the Apps Script code editor. Any code over approximately 100 lines will not display the matching outermost closing curly braces in green. Closing curly braces inside of the function block will show ending matching curly braces correctly as colored green. This bug seems to only affect the ending curly brace for the function block itself.

此外,请勿在评论中使用句点.这将导致上下文菜单停止显示.

Also, don't use periods in comments. It will cause the context menu to stop displaying.

问题跟踪器上报告了一个问题,

There is an issue reported on the Issue Tracker at:

问题跟踪器-应用脚本-终止大括号

这篇关于最后一个括号→}变成红色而不是绿色,但是脚本正常工作(Google App脚本)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆