Skip to content

can't parse comment inside array #9

@linonetwo

Description

@linonetwo
var json = require("comment-json")

json.parse(`
{
  "hotkey": "alt+space",
  "theme": "linonetwo/zazu-light-theme",
  "displayOn": "detect",
  "blur": false,
  "plugins": [
    // {
    //   "name": "linonetwo/zazu-clipboard",
    //   "variables": {
    //     "ClipboardKey": "cmd+shift+v"
    //   }
    // },
    // {
    //   "name": "linonetwo/zazu-firefox-bookmarks",
    //   "variables": {
    //     "limit": 10,
    //     "prefix": false
    //   }
    // },
    // {
    //   "name": "linonetwo/zazu-translation",
    //   "variables": {
    //     "anki": true,
    //     "deckName": "英语",
    //     "modelName": "基础",
    //     "fields": {
    //       "raw": "正面",
    //       "result": "背面"
    //     }
    //   }
    // },
    // {
    //   "name": "tinytacoteam/zazu-fallback",
    //   "variables": {
    //     "prefixSearches": {
    //       "c++": {
    //         "icon": "https://en.cppreference.com/favicon.ico",
    //         "name": "C++ Reference",
    //         "url": "https://en.cppreference.com/mwiki/index.php?search="
    //       },
    //       "fa": {
    //         "icon": "fa-font-awesome fab",
    //         "name": "FontAwesome",
    //         "url": "https://fontawesome.com/icons?d=gallery&q="
    //       },
    //       "caniuse": {
    //         "icon": "fa-chart-bar",
    //         "name": "Can I use",
    //         "url": "https://caniuse.com/#search="
    //       },
    //       "taobao": {
    //         "icon": "fa-alipay fab",
    //         "name": "Taobao",
    //         "url": "https://s.taobao.com/search?q="
    //       },
    //       "bili": {
    //         "icon": "fa-play",
    //         "name": "BiliBili",
    //         "url": "https://search.bilibili.com/all?keyword="
    //       },
    //       "baidu": {
    //         "icon": "fa-trash",
    //         "name": "Baidu",
    //         "url": "http://www.baidu.com/s?wd="
    //       },
    //       "zhihu": {
    //         "icon": "fa-zhihu fab",
    //         "name": "Zhihu",
    //         "url": "https://www.zhihu.com/search?type=content&q="
    //       },
    //       "crate": {
    //         "icon": "fa-box",
    //         "name": "Rust Crates",
    //         "url": "https://crates.io/search?q="
    //       },
    //       "doc": {
    //         "icon": "fa-dev fab",
    //         "name": "DevDocs",
    //         "url": "https://devdocs.io/?q="
    //       },
    //       "steam": {
    //         "icon": "fa-steam fab",
    //         "name": "Steam",
    //         "url": "https://store.steampowered.com/search/?term="
    //       },
    //       "firefox": {
    //         "icon": "fa-firefox fab",
    //         "name": "Firefox Extension",
    //         "url": "https://addons.mozilla.org/en-US/firefox/search/?q="
    //       },
    //       "commit": {
    //         "icon": "fa-code",
    //         "name": "My Github Commits",
    //         "url": "https://github.com/search?type=Commits&q=user%3Alinonetwo+"
    //       },
    //       "star": {
    //         "icon": "fa-star",
    //         "name": "My Github Stars",
    //         "url": "https://github.com/linonetwo?tab=stars&utf8=%E2%9C%93&q="
    //       },
    //       "ghmy": {
    //         "icon": "fa-github-square fab",
    //         "name": "My Github Repos",
    //         "url": "https://github.com/search?type=Code&q=user%3Alinonetwo+"
    //       }
    //     },
    //     "rootSearches": ["google"]
    //   }
    // },
    // "tinytacoteam/zazu-calculator",
    // "tinytacoteam/zazu-system",
    "tinytacoteam/zazu-package-manager",
    // "linonetwo/zazu-tldr",
    // "blakek/zazu-ip-address",
    // "halvves/zazu-colors",
    // "puyt/zazu-utime"
  ]
}
`)
SyntaxError: Unexpected token ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions