ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
35.06k stars 2.56k forks source link

Autodoc: embedding html in document comments causes rendering errors #22043

Closed MINGtoMING closed 1 day ago

MINGtoMING commented 1 day ago

Zig Version

0.14.0-dev.2270+a5d4ad17b

Steps to Reproduce and Observed Behavior

/// Add func. ///

///
///
///
///
pub fn add(a: i32, b: i32) i32 { return a + b; }

test add { try testing.expect(add(3, 7) == 10); }



- current result:
![image](https://github.com/user-attachments/assets/e90542c0-980f-4315-ad9d-1f5779dbdf9d)

The corresponding html content is not rendered properly.

### Expected Behavior

- expected result:
![image](https://github.com/user-attachments/assets/49ee383c-c41c-4a90-bc91-9afc1fb61eb2)
Beyley commented 1 day ago

I believe this is intentional, not a bug.

Zig document comments are markdown, not HTML.

See this comment, where it's stated that HTML support is an explicitly not wanted feature.

MINGtoMING commented 1 day ago

@Beyley Thanks, got it.