Request: Add “type” attribute of <ol> to whitelist. Suggestion to do the same with “reversed” for <ol>, and “value” for <li>, for similar but less common reasons.
Purpose: These attributes are intended for use where the marker of ordered list items itself conveys meaning to the content of the list. Typically this is the case when list items are intended to be referred to via this marker. This is in contrast to CSS list-style-type which is intended where the choice of marker carries no significant purpose. (Though I did see it recommended for forum-wide localization, which is pretty great!)
Background: While attempting to quote an official reference document, I discovered an apparent limitation in list formatting which prevents doing so accurately. Quite often, list markers are purely stylistic. However, they are occasionally used to facilitate reference in list-heavy documents. For example, in official and legal documents, a list item (or sub-item) might be referred to by list marker: “Official Document Article I, section 1(a)(i)”
I’m uncertain of whether a standard method is available in BBCode, to the extent anything is standard in BBCode. I was unable to find anything more advanced than starting at an arbitrary digit. BBCode list tags don’t appear used by Discourse, anyway.
With HTML and HTML+style, neither produce the correct result:
다만, 이러한 속성을 도입하면 HTML-to-markdown 변환기가 해당 속성을 인식하지 못할 수 있습니다. 하지만 위에서 보여준 것처럼, 현재 markdown-it는 이러한 속성을 나타내는 마크다운 구문을 처리할 수조차 없습니다. 이를 위해 한 단계 더 나아가 CommonMark에서 목록 유형을 구현하는 것이 바람직할 수 있습니다…
목록 장식을 임의로 적용하는 것이 목표라면 좋은 해결책이지만, HTML의 type 속성은 목록 마커의 차이가 단순한 장식을 넘어 의미론적으로 중요한 상황, 즉 항목이 번호나 문자로 참조되는 법적 또는 기술적 문서와 같은 경우에 특히 사용하도록 설계되었습니다. MDN 문서(<ol> HTML ordered list element - HTML | MDN)에는 다음과 같이 명시되어 있습니다.
목록 번호의 유형이 중요하지 않다면(항목이 번호/문자로 참조되는 법적 또는 기술적 문서와 같은 경우 제외), CSS의 list-style-type 속성을 사용하는 것이 좋습니다.
HTML 4.01에서는 이 속성이 순수하게 스타일링 목적이라는 이유로 비추천(deprecated) 처리되었지만, MDN에서 설명한 대로 참조 목록을 인코딩하기 위한 특정 목적으로 HTML5에서 다시 도입되었습니다. 그만큼 보편적인 요구 사항이기 때문입니다.
해당 솔루션을 시도해 보니 동작하더군요. CSS를 다음과 같이 수정하면 됩니다(첫 줄에 ol {가 빠져 있었습니다):
.cooked div[data-wrap="letterlist"] ol {
list-style: upper-alpha;
}
하지만 에디터 미리보기 창에는 표시가 되지 않는데, 이는 대부분의 사용자들에게 다소 문제가 될 것 같습니다. 웹 브라우저로 인스펙션을 시도해 봤는데, 커스텀 CSS가 미리보기에 로드되거나 적용되지 않는 것으로 보입니다(전문가는 아니므로 제 추측이 틀렸을 수도 있습니다).