Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Tidy: Use params instead of JSON

未關閉
#647 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

@jgclark 已經在處理了。

開始於 2025年6月21日。

評估

這個 Issue 還沒有評估資料。

描述

enhancement

I find the JSON in many of the Tidy commands (esp "Remove Section...") mess things up and either don't work or cause the command to fail. I think having links, quote marks and emojis inside the JSON often keep it from working.

I would like to ask you to think about keeping JSON as the first param for backwards compat but also add individual parameters for each to use if you prefer. This will make xcallbacks and template commands more easy to understand and more reliable.

So for example:

export async function removeSectionFromRecentNotes(params: string = ''): Promise<void> {

would become:

export async function removeSectionFromRecentNotes(
  params: string = '',
  numDaysParam?: number,
  runSilentlyParam?: boolean,
  matchTypeParam?: MatchType,
  sectionHeadingParam?: string,
): Promise<void> {

I would suggest having Cursor create a generic helper similar to your overrideSettingsWithEncodedTypedArgs() but that allows for either JSON or an array of parameters so that you can use it in any of the commands that use JSON params.

主要語言
JavaScript
星號
204
分支
82
平均合併
22 小時 27 分鐘
30 天內合併 PR
3

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NotePlan/plugins 的其他 Issue

查看 NotePlan/plugins 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。