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
* Is 'term' (typically a #tag) found in a string potentially containing a URL [[...]] or a URL in a string which may contain 0 or more notelinks and URLs?
* Add a new paragraph and preceding heading(s) to a note. If the headings already exist, then don't add them again, but insert the paragraph after the existing headings.
385
392
* @test in jgclark.QuickCapture/index.js
386
-
*
393
+
*
387
394
* @param {TNote} destNote
388
-
* @param {string} paraText
389
-
* @param {ParagraphType} paragraphType
395
+
* @param {string} paraText
396
+
* @param {ParagraphType} paragraphType
390
397
* @param {Array<string>} headingArray - the headings from H1 (or H2) downwards
391
398
* @param {number} firstHeadingLevel - the level of the first heading given (1, 2, 3, etc.)
392
399
* @param {boolean} shouldAppend - whether to append the paragraph after the headings or not.
@@ -397,7 +404,7 @@ export function smartCreateSectionsAndPara(
397
404
paragraphType: ParagraphType,
398
405
headingArray: Array<string>,
399
406
firstHeadingLevel: number,
400
-
shouldAppend: boolean=false
407
+
shouldAppend: boolean=false,
401
408
): void{
402
409
try{
403
410
// Work out which of the given headings already exist.
@@ -426,7 +433,10 @@ export function smartCreateSectionsAndPara(
logDebug('paragraph/smartCreateSectionsAndPara',`noting existing heading "${thisHeadingPara.content}" at line ${String(latestInsertionLineIndex-1)} level ${String(thisHeadingPara.headingLevel)}`)
436
+
logDebug(
437
+
'paragraph/smartCreateSectionsAndPara',
438
+
`noting existing heading "${thisHeadingPara.content}" at line ${String(latestInsertionLineIndex-1)} level ${String(thisHeadingPara.headingLevel)}`,
439
+
)
430
440
}else{
431
441
// Heading doesn't exist, so add it
432
442
letinsertionIndex=0
@@ -458,7 +468,7 @@ export function smartCreateSectionsAndPara(
458
468
* Note: does work on a single line too.
459
469
* @author@jgclark
460
470
* @test in jgclark.QuickCapture/index.js
461
-
*
471
+
*
462
472
* @param {TNote} note - the note to prepend to
463
473
* @param {number} insertionIndex - the line to insert the text at
464
474
* @param {Array<string>} paraTextArr - an array of text to prepend
0 commit comments