javascript-tutorial / javascript-tutorial/en.javascript.info

Italicizing non-literal syntax?

Đang mở
#1,500 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
HTML
Star
25.5k
Fork
4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

How about, when showing syntax like:

node.append(...nodes or strings) – append nodes or strings at the end of node,
node.prepend(...nodes or strings) – insert nodes or strings into the beginning of node,

that "node" (in this case), or whatever syntax is not literal, that is, that stands for some general type of thing, be put in italics, i.e., in this case, to have instead:

node.append(...nodes or strings) – append nodes or strings at the end of node,
node.prepend(...nodes or strings) – insert nodes or strings into the beginning of node,

(From: https://javascript.info/modifying-document)

I think that would make the meaning of the syntax clearer. Also, this is what MDN does in their Syntax descriptions, e.g.:

element.appendChild(aChild);
https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild

This would also address some of my earlier concerns with the use of "str", "array", "obj", etc. from a couple months ago.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng việc xem lại các ví dụ cú pháp trong bài viết modifying-document được liên kết và so sánh chúng với ví dụ MDN appendChild. Xác định phạm vi áp dụng chữ in nghiêng cho cú pháp không phải literal trong toàn bộ tutorial, sau đó ghi lại quy ước và cập nhật nhất quán các ví dụ liên quan.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.