|
@@ -18,6 +18,9 @@ function CalculateCalibrationSum(document: string[]): number {
|
|
|
*
|
|
|
* If only one digit is present, the one digit is concatenated to
|
|
|
* itself.
|
|
|
+ *
|
|
|
+ * Uses a lookahead regex group to handle nested words
|
|
|
+ * @see https://mtsknn.fi/blog/how-to-do-overlapping-matches-with-regular-expressions/#capturing-groups-inside-lookahead-lookbehind-assertions
|
|
|
*
|
|
|
* @param {string} line The line of text to extract the calibration value out of
|
|
|
* @returns {number} The two-digit calibration value hidden in that string
|