【问题标题】:Exclamation and question marks in javascript comments?javascript评论中的感叹号和问号?
【发布时间】:2022-07-26 23:46:17
【问题描述】:

我正在查看一些代码并找到了这两个:

//   ! if (!playbackState) return
//   ?  if (isSpotify) setPlayerTime(playbackState.position)

在 VSCode 中,带有“!”的行以红色突出显示,另一个以蓝色突出显示。 没找到相关信息

【问题讨论】:

    标签: javascript comments


    【解决方案1】:

    我正在跳跃(或者因为缺少某些上下文而有点跳跃)并假设您安装了 better-cmets

    为此,在我的 settings.json 中找到了以下内容,它确实解释了这一点

        "better-comments.tags": [
            {
                "tag": "!",
                "color": "#FF2D00",
                "strikethrough": false,
                "underline": false,
                "backgroundColor": "transparent",
                "bold": false,
                "italic": false
            },
            {
                "tag": "?",
                "color": "#3498DB",
                "strikethrough": false,
                "underline": false,
                "backgroundColor": "transparent",
                "bold": false,
                "italic": false
            },
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-12
      • 1970-01-01
      • 2013-09-21
      • 2011-12-22
      • 1970-01-01
      • 1970-01-01
      • 2015-04-09
      • 1970-01-01
      相关资源
      最近更新 更多