PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: segmentio/encoding (go)

Issue:
json.Unmarshaler difference: UnmarshalJSON([]byte("null")) skipped
Go 1.14.8 linux/amd64

v0.1.15 does not use my custom `UnmarshalJSON()` for `[]byte("null")`

[Documentation](https://golang.org/pkg/encoding/json/#Unmarshaler) says:
> By convention, to approximate the behavior of Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as a no-op.

`encoding/json` calls it, `github.com/segmentio/encoding/json` skips it.

```
package main

import (
	//"encoding/json"
	"fmt"
	"github.com/segmentio/encoding/json"
)

type RawJsonString string

func (r *RawJsonString) UnmarshalJSON(b []byte) error {
	fmt.Printf("UnmarshalJSON: %s\n", string(b))
	if len(b) == 0 {
		*r = "null"
	} else {
		*r = RawJsonString(b)
	}
	return nil
}

func main() {
	var out RawJsonString
	if err := json.Unmarshal([]byte("null"), &out); err != nil {
		panic(err)
	}
	fmt.Printf("out = %#v\n", out)
}
```


`encoding/json`:
```
  UnmarshalJSON: null
  out = "null"
```

`github.com/segmentio/encoding/json`:
```
  out = ""
```


Pull request:
fix issue 44
Fixes #44 

Patch:
diff --git a/json/decode.go b/json/decode.go
index e01b444..caf6e8a 100644
--- a/json/decode.go
+++ b/json/decode.go
@@ -1135,10 +1135,6 @@ func (d decoder) decodeJSONUnmarshaler(b []byte, p unsafe.Pointer, t reflect.Typ
 		return b, err
 	}
 
-	if len(v) != 0 && v[0] == 'n' { // null
-		return b, nil
-	}
-
 	u := reflect.NewAt(t, p)
 	if !pointer {
 		u = u.Elem()
@@ -1147,6 +1143,7 @@ func (d decoder) decodeJSONUnmarshaler(b []byte, p unsafe.Pointer, t reflect.Typ
 	if u.IsNil() {
 		u.Set(reflect.New(t))
 	}
+
 	return b, u.Interface().(Unmarshaler).UnmarshalJSON(v)
 }
 


Test patch:
diff --git a/json/json_test.go b/json/json_test.go
index cf7e18d..e78debe 100644
--- a/json/json_test.go
+++ b/json/json_test.go
@@ -1559,6 +1559,27 @@ func TestGithubIssue41(t *testing.T) {
 
 }
 
+func TestGithubIssue44(t *testing.T) {
+	var out rawJsonString
+	if err := Unmarshal([]byte("null"), &out); err != nil {
+		t.Fatal(err)
+	}
+	if out != "null" {
+		t.Errorf("wanted \"null\" but got %q", out)
+	}
+}
+
+type rawJsonString string
+
+func (r *rawJsonString) UnmarshalJSON(b []byte) error {
+	if len(b) == 0 {
+		*r = "null"
+	} else {
+		*r = rawJsonString(b)
+	}
+	return nil
+}
+
 func TestSetTrustRawMessage(t *testing.T) {
 	buf := &bytes.Buffer{}
 	enc := NewEncoder(buf)
Repository: ant-design/ant-design-mobile (ts)

Issue:
 5.31.0 Ellipsis对于换行符\n计算问题
### Version of antd-mobile

5.31.0

### Operating system and its version

Others

### Browser and its version

_No response_

### Sandbox to reproduce

5.31.0
https://codesandbox.io/s/crimson-http-z75h4w?file=/app.tsx

5.30.0
https://codesandbox.io/s/infallible-cookies-vpxdhv

### What happened?
应该是innerText 改为 innerHTML的原因
感觉可以从whiteSpace 上做更改
在获取父元素style样式之前赋值container.style.whiteSpace = 'normal'; 可行吗？

### Relevant log output

_No response_

Pull request:
fix(Ellipsis): the `whiteSpace` style of the calc container should be the same as Ellipsis
Close #6338

Patch:
diff --git a/src/components/ellipsis/ellipsis.tsx b/src/components/ellipsis/ellipsis.tsx
index d992fd63f..ed59b211e 100644
--- a/src/components/ellipsis/ellipsis.tsx
+++ b/src/components/ellipsis/ellipsis.tsx
@@ -74,7 +74,6 @@ export const Ellipsis: FC<EllipsisProps> = p => {
     container.style.minHeight = 'auto'
     container.style.maxHeight = 'auto'
     container.style.textOverflow = 'clip'
-    container.style.whiteSpace = 'normal'
     container.style.webkitLineClamp = 'unset'
     container.style.display = 'block'
 


Test patch:
diff --git a/src/components/ellipsis/tests/ellipsis.test.tsx b/src/components/ellipsis/tests/ellipsis.test.tsx
index 763afca20..fdb89ed8b 100644
--- a/src/components/ellipsis/tests/ellipsis.test.tsx
+++ b/src/components/ellipsis/tests/ellipsis.test.tsx
@@ -151,4 +151,22 @@ describe('Ellipsis', () => {
     fireEvent.click(getByText('expand'))
     expect(getByText('collapse')).toBeInTheDocument()
   })
+
+  test('the `whiteSpace` style of the calc container should be the same as Ellipsis', () => {
+    let container: Element | null = null
+    Object.defineProperty(HTMLElement.prototype, 'removeChild', {
+      value: (child: Element) => {
+        container = child
+      },
+    })
+    render(
+      <Ellipsis
+        style={{
+          whiteSpace: 'pre-wrap',
+        }}
+        content={content}
+      />
+    )
+    expect(container).toHaveStyle('white-space: pre-wrap')
+  })
 })