Cicero Draft normalises indents to 3 spaces instead of the standard 4
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- markdown, typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Start by reading the cicero draft command path that formats template grammar output and trace where indentation is normalized. Reproduce with an indented list and sublist; the expected result is that their relative positions are preserved in the generated Markdown. The issue gives no file or test names, so first locate the command and its formatting tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Running cicero draft over a template grammar file to create a sample.md file results in indents being normalised to only having three spaces. This can result in inconsistencies in certain implementations where a list item were intended to be sublists but are instead normalised to being on the same level.
From the CommonMark standard:
"the position of the text after the list marker determines how much indentation is needed in subsequent blocks in the list item. If the list marker takes up two spaces, and there are three spaces between the list marker and the next non-whitespace character, then blocks must be indented five spaces in order to fall under the list item."
To Reproduce
Steps to reproduce the behavior:
- Create a simple template grammar which uses an indented list (see screenshot 1)
- Run cicero draft command (output is screenshot 2)
- Attempt to view resultant markdown file (the VSCode default 'preview' for example) (see screenshot 3)
Expected behavior
Relative position of lists and sublists established in the template grammar should be preserved.
Screenshots
1: 
2: 
3: 
Further context
From the CommonMark spec:
"Indentation. If a sequence of lines Ls constitutes a list item according to rule accordproject/cicero#1, accordproject/cicero#2, or accordproject/cicero#3, then the result of indenting each line of Ls by 1-3 spaces (the same for each line) also constitutes a list item with the same contents and attributes. If a line is empty, then it need not be indented."
See the significant discussion on this point in the commonmark spec
- Ngôn ngữ chính
- TypeScript
- Star
- 86
- Fork
- 69
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 3
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 accordproject/markdown-transform
-
Stale
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
accordproject/markdown-transform#679 · 2 bình luận ·
-
@accordproject/markdown-it-template has a Nerq Trust Score of 68.0/100 — verified badge availableĐang mởStale
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
accordproject/markdown-transform#664 · 1 bình luận ·
-
Stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
accordproject/markdown-transform#582 · 2 bình luận ·
-
Rename CiceroMark to AgreementMarkCó thể làm lại được @anablaz đã nhận 980 ngày trước và không có pull request nào đang mở. Đang mởStale
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
accordproject/markdown-transform#536 · 4 bình luận ·
-
Variable Name ConflictsĐang mởDifficulty: Challenging maintainer-engaged Priority: High ⚠️ Type: Bug 🐛
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
accordproject/markdown-transform#371 · 3 bình luận ·
Tất cả issue của accordproject/markdown-transform
Issue tương tự
-
Mend: dependency security vulnerability
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 65/100
fdm-monster/fdm-monster#5563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
growilabs/growi#12246 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SSWConsulting/SSW.Rules#2809 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày