PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: node-fetch/node-fetch (js)
Issue: non-standard HTTP methods are not uppercased by Chrome
<!--- Provide a clear and concise description of what the bug is. -->

**Reproduction**

Steps to reproduce the behavior:
In the browser (Google Chrome), run this code from the console then look at the request in the Dev Tools Network tab

```js
fetch('aoeu.jpg', {method: 'weirdMETHOD'})
```

It'll show

```
Request Method: weirdMETHOD
```

but 
```
fetch('aoeu.jpg', {method: 'post'})
```

will send `POST`.

But if you run the same code with `node-fetch`, it'll send `WEIRDMETHOD`

```js
import fetch from 'node-fetch';
fetch('http://localhost:8888/', {method: 'weirdMETHOD'});
```
```
nc -kl 8888
```

will show

```
WEIRDMETHOD / HTTP/1.1
```

**Expected behavior**

`node-fetch` will behave the same way as Chrome's `fetch()`

**Your Environment**

<!--- Include as many relevant details about the environment you experienced the bug in -->

| software         | version
| ---------------- | -------
| node-fetch       | ^3.2.3
| node             |v16.14.2
| npm              |8.5.3
| Operating System |macOS 12.3.1
Pull request description: fix: don't uppercase unknown methods
<!-- Thanks for contributing! -->

## Purpose
The purpose is to follow [Fetch Spec](https://fetch.spec.whatwg.org/#concept-method-normalize) 

## Changes

As per spec:
To normalize a method, if it is a byte-case-insensitive match for `DELETE`, `GET`, `HEAD`, `OPTIONS`, `POST`, or `PUT`, byte-uppercase it. 

___

<!-- Mark the ones you have done and remove unnecessary ones. Add new tasks that fit (like TODOs). -->
- [ ] I updated readme
- [ ] I added unit test(s)

___

<!-- Add `- fix #_NUMBER_` line for every PR/Issue this PR solves. Do not comma separate them. -->
- fix #1538


Patch:
diff --git a/src/request.js b/src/request.js
index a4d1b22..a63f7e6 100644
--- a/src/request.js
+++ b/src/request.js
@@ -61,7 +61,9 @@ export default class Request extends Body {
 		}
 
 		let method = init.method || input.method || 'GET';
-		method = method.toUpperCase();
+		if (/^(delete|get|head|options|post|put)$/i.test(method)) {
+			method = method.toUpperCase();
+		}
 
 		if ('data' in init) {
 			doBadDataWarn();


Test patch:
diff --git a/test/request.js b/test/request.js
index b8ba107..03cbe3c 100644
--- a/test/request.js
+++ b/test/request.js
@@ -151,6 +151,24 @@ describe('Request', () => {
 		expect(request.headers.get('a')).to.equal('1');
 	});
 
+	it('should uppercase DELETE, GET, HEAD, OPTIONS, POST and PUT methods', () => {
+		const url = base;
+		for (const method of ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']) {
+			const request = new Request(url, {
+				method: method.toLowerCase()
+			});
+			expect(request.method).to.equal(method);
+		}
+	});
+
+	it('should not uppercase unknown methods and patch', () => {
+		const url = base;
+		for (const method of ['patch', 'chicken']) {
+			const request = new Request(url, {method});
+			expect(request.method).to.equal(method);
+		}
+	});
+
 	it('should support arrayBuffer() method', () => {
 		const url = base;
 		const request = new Request(url, {
Repository: zestedesavoir/zmarkdown (js)
Issue: abbr ending with a period are not parsed
WIth this markdown ; 

```
LLPANMP

L.L.P.A.N.M.P.


*[L.L.P.A.N.M.P.]: Les légendes pour les sigles ne marchent plus
*[LLPANMP]: Les légendes pour les sigles ne marchent plus
```
we get :  

```html
<p><abbr title="Les légendes pour les sigles ne marchent plus">LLPANMP</abbr></p>
<p>L.L.P.A.N.M.P.</p>
```

but we expected: 

```html
<p><abbr title="Les légendes pour les sigles ne marchent plus">LLPANMP</abbr></p>
<p><abbr title="Les légendes pour les sigles ne marchent plus">L.L.P.A.N.M.P.</abbr></p>
```
Pull request description: remark-abbr: abbr ending with period are now parsed
fix #244

Patch:
diff --git a/packages/remark-abbr/dist/index.js b/packages/remark-abbr/dist/index.js
index 0b75e9c9..cd900792 100644
--- a/packages/remark-abbr/dist/index.js
+++ b/packages/remark-abbr/dist/index.js
@@ -63,7 +63,7 @@ function plugin() {
     }
 
     var pattern = Object.keys(abbrs).map(escapeRegExp).join('|');
-    var regex = new RegExp('\\b(' + pattern + ')\\b');
+    var regex = new RegExp('(\\b|\\W)(' + pattern + ')(\\b|\\W)');
 
     function one(node, index, parent) {
       if (Object.keys(abbrs).length === 0) return;
diff --git a/packages/remark-abbr/src/index.js b/packages/remark-abbr/src/index.js
index bf60e440..24e8cafb 100644
--- a/packages/remark-abbr/src/index.js
+++ b/packages/remark-abbr/src/index.js
@@ -58,7 +58,7 @@ function plugin () {
     }
 
     const pattern = Object.keys(abbrs).map(escapeRegExp).join('|')
-    const regex = new RegExp(`\\b(${pattern})\\b`)
+    const regex = new RegExp(`(\\b|\\W)(${pattern})(\\b|\\W)`)
 
     function one (node, index, parent) {
       if (Object.keys(abbrs).length === 0) return


Test patch:
diff --git a/packages/remark-abbr/__tests__/index.js b/packages/remark-abbr/__tests__/index.js
index 9acada07..accf5c82 100644
--- a/packages/remark-abbr/__tests__/index.js
+++ b/packages/remark-abbr/__tests__/index.js
@@ -112,3 +112,46 @@ test('compiles to markdown', () => {
 
   expect(contents1).toBe(contents2)
 })
+
+it('handles abbreviations ending with a period', () => {
+  const {contents} = render(dedent`
+    A.B.C. and C-D%F. foo
+
+    *[A.B.C.]: ref1
+    *[C-D%F.]: ref2
+  `)
+
+  expect(contents).toBe(
+    `<p><abbr title="ref1">A.B.C.</abbr> and ` +
+    `<abbr title="ref2">C-D%F.</abbr> foo</p>`)
+})
+
+it('does not parse words starting with abbr', () => {
+  const {contents} = render(dedent`
+    ABC ABC ABC
+
+    *[AB]: ref1
+  `)
+
+  expect(contents).not.toContain('<abbr')
+})
+
+it('does not parse words ending with abbr', () => {
+  const {contents} = render(dedent`
+    ABC ABC ABC
+
+    *[BC]: ref1
+  `)
+
+  expect(contents).not.toContain('<abbr')
+})
+
+it('does not parse words containing abbr', () => {
+  const {contents} = render(dedent`
+    ABC ABC ABC
+
+    *[B]: ref1
+  `)
+
+  expect(contents).not.toContain('<abbr')
+})