You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5e65d09
Browse filesBrowse the repository at this point in the historyBrowse files
throw`paragraphMatches: paragraph.${field} is undefined. You must pass in the correct fields to match. 'fields' is set to ${JSP(fields)}, but paragraph=${JSP(
1248
+
paragraph,
1249
+
)}, which does not have all the fields`
1250
+
}
1251
+
// Exact match, or match ignoring leading indent (backlinks strip indent from rawContent)
@@ -1303,13 +1332,12 @@ export function findParagraph(
1303
1332
1304
1333
/**
1305
1334
* Take a static object with a subset of Paragraph fields from HTML or wherever and return the actual paragraph in the note
1335
+
* Note: rawContent matching allows leading-indent differences (as backlinks API unhelpfully returns indent-stripped rawContent for indented paras).
1306
1336
* @param {any} staticObject - the static object from the HTML must have fields:
1307
1337
* filename, lineIndex, noteType
1308
1338
* @param {Array<string>} fieldsToMatch - (optional) array of fields to match (e.g. filename, lineIndex) -- these two fields are required. default is ['filename', 'rawContent']
1309
1339
* @returns {TParagraph|null} - the paragraph or null if not found
1310
1340
* @author@dwertheimer
1311
-
* TODO(@dwertheimer): is the fieldsToMatch default and passing down to findParagraph correct?
logWarn('resolveBacklinkParaToRealPara',`falling back to backlink para: ${err.message}`)
785
+
returnbacklinkPara
786
+
}
787
+
}
788
+
753
789
/**
754
790
* Get the paragraphs in 'note' which are scheduled for date of the *private* calendar note 'calNote'
755
791
* TEST: Is this working in or from Teamspace notes? Initial testing on 20.8.25 by @jgclark implies not.
@@ -765,7 +801,7 @@ export function getReferencedParagraphs(calNote: Note, includeHeadings: boolean
765
801
766
802
// Use .backlinks, which is described as "Get all backlinks pointing to the current note as Paragraph objects. In this array, the toplevel items are all notes linking to the current note and the 'subItems' attributes (of the paragraph objects) contain the paragraphs with a link to the current note. The headings of the linked paragraphs are also listed here, although they don't have to contain a link."
767
803
// Note: @jgclark reckons that the subItem.headingLevel data returned by this might be wrong.
768
-
// Note: @EM confirms that this returns backlinks only with indent 0, by design. @jgclark has added a helper to help with this issue.
804
+
// Note: @EM confirms that this returns backlinks only with indent 0, by design. resolveBacklinkParaToRealPara() restores correct rawContent/indents.
769
805
constbacklinkParas: Array<TParagraph>=getFlatListOfBacklinks(calNote)// an array of notes which link to this note
770
806
logDebug(`getReferencedParagraphs`,`found ${String(backlinkParas.length)} backlinked paras for ${displayTitle(calNote)}:`)
771
807
@@ -776,21 +812,24 @@ export function getReferencedParagraphs(calNote: Note, includeHeadings: boolean
776
812
'getReferencedParagraphs',
777
813
` - referenced para is null. Found in one of ${backlinkParas.length} backlink paras for note '${displayTitle(calNote)}' at ${calNote.filename}.`,
778
814
)
815
+
return
779
816
}
780
817
if(includeHeadings){
781
818
// logDebug(`getReferencedParagraphs`, `- adding "${para.content}" as we want headings`)
logDebug(`getReferencedParagraphs`,`- adding #${para.lineIndex}: '${para.content}' as it includes >${thisDateStr} or >today from ${para.note?.filename??'<no note>'}`)
784
-
if(!para.note){
821
+
constresolved=resolveBacklinkParaToRealPara(para)
822
+
logDebug(`getReferencedParagraphs`,`- adding #${resolved.lineIndex}: '${resolved.content}' as it includes >${thisDateStr} or >today from ${resolved.note?.filename??'<no note>'}`)
823
+
if(!resolved.note){
785
824
logWarn(`getReferencedParagraphs`,` - this backlink para.note is null. Para:\n${JSON.stringify(para,null,2)}`)
786
825
}
787
826
788
827
// Log if content contains TEST. TODO(later): remove after testing backlinks workaround
789
-
if(para.content.includes('TEST')){
790
-
logInfo(`getReferencedParagraphs`,`FYI 👉 found TEST in #${para.lineIndex}: '${calNote.filename}' [${para.type}] {${para.rawContent}}`)
828
+
if(resolved.content.includes('TEST')){
829
+
logInfo(`getReferencedParagraphs`,`FYI 👉 found TEST in #${resolved.lineIndex}: '${calNote.filename}' [${resolved.type}] {${resolved.rawContent}}`)
791
830
}
792
831
793
-
wantedParas.push(para)
832
+
wantedParas.push(resolved)
794
833
}else{
795
834
// logDebug(`getReferencedParagraphs`, `- skipping "${para.content}" as it doesn't include >${thisDateStr}`)
Copy file name to clipboardExpand all lines: jgclark.Dashboard/CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ For more details see the [plugin's documentation](https://github.com/NotePlan/pl
8
8
- TODO: fix long-standing layout bug where some tooltips were getting clipped
9
9
- TODO: fix isNoteFromAllowedFolder() for teamspace or possibly 2025-W21.md
10
10
-->
11
+
## [2.4.0.b54] 2026-07-22
12
+
- Fix: moving / rescheduling **indented** tasks and checklists no longer fails to find the paragraph. Matching now allows leading-indent differences (NotePlan backlinks return indent-stripped rawContent), and referenced paras are resolved back to the real note paragraph so "Move All → ..." and dialog actions keep correct indent.
13
+
- Fix: saying **No** to the bulk-move confirmation (e.g. Move All This Week → Next Week) no longer shows a "something's gone wrong" banner; it only logs that the user cancelled.
14
+
11
15
## [2.4.0.b53] 2026-07-21
12
16
- Fix to layout that was pushing the notelinks down to a third line in some cases
13
17
- Change: mid-task and source note links now show a shorter label -- use NotePlan `[alias]([[title]])` when present, drop `#heading`, and truncate titles over 50 characters with `…`
0 commit comments