Remove Property is not working as expected.
@aeschli 已经在做这个了。
开始于 2018年5月4日。
评估
这个 Issue 还没有评估数据。
描述
It's such a great tool to handle JSON (with comments). Thanks!
But I find that it can not pass the following test:
test('remove property', () => {
let content = '{\n "x": "y",\n // This is a comment\n "test": "1"\n}';
let edits = removeProperty(content, ['x'], formatterOptions);
assertEdit(content, edits, '{\n // This is a comment\n "test": "1"\n}');
});
I've added a comment right after the property x. What I want is to remove the property but keep the comment. But jsonc-parser removes the comment too, which I think this maybe a bug or something?
P.S. You can test this in edit.test.ts.
- 主要语言
- TypeScript
- 星标
- 759
- 派生
- 66
- 平均合并
- 5 天 10 小时
- 30 天内合并 PR
- 7
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/node-jsonc-parser 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 72/100
microsoft/node-jsonc-parser#125 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
microsoft/node-jsonc-parser#105 ·
-
难度 4/5 3-5 天 新手友好度 45/100
microsoft/node-jsonc-parser#103 · 2 条评论 · 8 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 48/100
microsoft/node-jsonc-parser#97 · 2 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
microsoft/node-jsonc-parser#95 · 1 个 reaction ·
查看 microsoft/node-jsonc-parser 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
calcite-components needs triage refactor
难度 2/5 1-3 小时 新手友好度 75/100
Esri/calcite-design-system#15203 ·
-
难度 2/5 1-3 小时 新手友好度 90/100
danielmiessler/LifeOS#2218 ·