PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: platers/obsidian-linter (ts)

Issue:
Colon in H1 invalidates YAML
I used some titles with colons (e.g., `#V02: A title`). 
The automatic insert in the yaml title as `title: V02: A title` results in an invalid yaml (reason: double colon).

Suggestion: Some characters may be filtered before inserting them in the yaml.

Edit: On a second thought, the titles could just be inserted in quotation marks. ;)

Pull request:
Add fix to long titles
Fixes #185 

Patch:
diff --git a/src/utils.ts b/src/utils.ts
index a04a486..47956ed 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -194,5 +194,5 @@ export function loadYAML(yaml_text: string): any {
 }
 
 export function escapeYamlString(str: string): string {
-  return dump(str).slice(0, -1);
+  return dump(str, {lineWidth: -1}).slice(0, -1);
 }


Test patch:
diff --git a/src/test.ts b/src/test.ts
index d6e8994..86763f5 100644
--- a/src/test.ts
+++ b/src/test.ts
@@ -658,4 +658,19 @@ describe('YAML Title', () => {
 
     expect(rulesDict['yaml-title'].apply(before, {'Title Key': 'title'})).toBe(after);
   });
+
+  it('Does not insert line breaks for long title', () => {
+    const before = dedent`
+    # Very long title 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+    `;
+
+    const after = dedent`
+    ---
+    title: Very long title 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+    ---
+    # Very long title 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+    `;
+
+    expect(rulesDict['yaml-title'].apply(before, {'Title Key': 'title'})).toBe(after);
+  });
 });
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 65
Good morning! Here's your coding interview problem for today.

This problem was asked by Amazon.

Given a N by M matrix of numbers, print out the matrix in a clockwise spiral.

For example, given the following matrix:
```
[[1,  2,  3,  4,  5],
 [6,  7,  8,  9,  10],
 [11, 12, 13, 14, 15],
 [16, 17, 18, 19, 20]]
```
You should print out the following:
```
1
2
3
4
5
10
15
20
19
18
17
16
11
6
7
8
9
14
13
12
```

Pull request:
Day65
Resolves #139.

Patch:
diff --git a/README.md b/README.md
index fd6c7b0..505e64d 100644
--- a/README.md
+++ b/README.md
@@ -74,3 +74,4 @@ problems from
 * [Day 61](https://github.com/vaskoz/dailycodingproblem-go/issues/132)
 * [Day 62](https://github.com/vaskoz/dailycodingproblem-go/issues/134)
 * [Day 63](https://github.com/vaskoz/dailycodingproblem-go/issues/136)
+* [Day 65](https://github.com/vaskoz/dailycodingproblem-go/issues/139)
diff --git a/day65/problem.go b/day65/problem.go
new file mode 100644
index 0000000..42a54a2
--- /dev/null
+++ b/day65/problem.go
@@ -0,0 +1,49 @@
+package day65
+
+import (
+	"strconv"
+	"strings"
+)
+
+// ClockwiseSpiral returns a string that is a representation of the matrix
+// as a clockwise spiral starting from the top-left [0][0] coordinate.
+func ClockwiseSpiral(matrix [][]int) string {
+	if len(matrix) == 0 {
+		return ""
+	}
+	spiral := make([]string, 0, len(matrix)*len(matrix[0]))
+	var r, c int
+	var left, top, right, bottom int = 0, 0, len(matrix[0]), len(matrix)
+	for left < right && top < bottom {
+		// go right
+		for c < right {
+			spiral = append(spiral, strconv.Itoa(matrix[r][c]))
+			c++
+		}
+		c--
+		r++
+		top++
+		for r < bottom {
+			spiral = append(spiral, strconv.Itoa(matrix[r][c]))
+			r++
+		}
+		r--
+		c--
+		right--
+		for c >= left {
+			spiral = append(spiral, strconv.Itoa(matrix[r][c]))
+			c--
+		}
+		c++
+		r--
+		bottom--
+		for r >= top {
+			spiral = append(spiral, strconv.Itoa(matrix[r][c]))
+			r--
+		}
+		r++
+		c++
+		left++
+	}
+	return strings.Join(spiral, " ")
+}


Test patch:
diff --git a/day65/problem_test.go b/day65/problem_test.go
new file mode 100644
index 0000000..1c4e037
--- /dev/null
+++ b/day65/problem_test.go
@@ -0,0 +1,46 @@
+package day65
+
+import "testing"
+
+var testcases = []struct {
+	matrix   [][]int
+	expected string
+}{
+	{
+		[][]int{{1, 2, 3, 4, 5},
+			{6, 7, 8, 9, 10},
+			{11, 12, 13, 14, 15},
+			{16, 17, 18, 19, 20}},
+		"1 2 3 4 5 10 15 20 19 18 17 16 11 6 7 8 9 14 13 12",
+	},
+	{
+		[][]int{{1, 2},
+			{4, 3}},
+		"1 2 3 4",
+	},
+	{
+		[][]int{{}},
+		"",
+	},
+	{
+		[][]int{},
+		"",
+	},
+}
+
+func TestClockwiseSpiral(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := ClockwiseSpiral(tc.matrix); result != tc.expected {
+			t.Errorf("Expected %v got %v", tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkClockwiseSpiral(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			ClockwiseSpiral(tc.matrix)
+		}
+	}
+}