Cannot use a `|` character in table header
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Tái hiện vấn đề trong trình chỉnh sửa bằng cách tạo bảng được cung cấp và chuyển đổi giữa các chế độ xem Markdown và xem trước. So sánh mã nguồn Markdown sau mỗi lần chuyển đổi; được xem là hoàn tất khi các ký tự pipe được escape hoặc thực thể HTML được cung cấp vẫn nguyên vẹn và bảng tiếp tục được hiển thị chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The stacks-editor overwrites/parses markdown when switching between preview and markdown views which is not allowing me to put a | character into a header. Some variations that I've tried:
- Add
\to escape the pipes. the editor strips out my escapes. - Use the HTML character code
|. This also gets parsed out and translated to just | which loses the escape - Combine the above 2 approaches -
I\|Like\|\|PipesMaybe we can escape the character code and escape the escapes! Toggling between markdown and preview modes progressively modifies the markdown source until the table is broken as in, it renders a proper table but showsI|Like||Pipesand thenI|Like|Pipesand then broken table. - Try editing in the preview mode instead of the markdown. So build the table and then add the pipes in from the preview mode. Also doesn't work.
To Reproduce
- Try to create a table where one of the headers has a | in it. Example:
| Column1 | I\|Like\|Pipes |
| ------- | -------------- |
| tables | r fun |
- Switch to preview mode to ensure the escapes worked as I'd expect and see
I|Like|Pipesin the preview. - Either post or switch back to markdown view and see that the table no longer renders correctly.
Expected behavior
I should be able to put a | character into a table header if I'd like either by escaping them or using |. I'd expect toggling between view modes not to produce different results.
Screenshots

Desktop (please complete the following information):
- OS: [e.g. iOS] Windows
- Browser [e.g. chrome, safari] chrome
- Version [e.g. 22] 107.0.5304.63
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
- The old editor supported both escaping and
|. - The loss of content between switching views seems related to https://github.com/StackExchange/Stacks-Editor/issues/151
- Ngôn ngữ chính
- TypeScript
- Star
- 439
- Fork
- 61
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của StackExchange/Stacks-Editor
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#504 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
StackExchange/Stacks-Editor#395 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#343 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Task list supportĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#272 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Math formulas supportĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#250 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của StackExchange/Stacks-Editor
Issue tương tự
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openclaw/openclaw#168089 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
✨ enhancement needs-discussion
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferenceCó thể đã có người làm @alok-108 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/playwright#43263 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:studio type:security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue Stellar Wave trivial
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
StellarCanary/ProtocolCanary-Action#331 ·
Maintainer thường phản hồi trong vòng 1 ngày