Mã wiki
Mã wiki (tiếng Anh: wikitext), còn được gọi là mã đánh dấu wiki (tiếng Anh: wiki markup) hay wikicode, là ngôn ngữ đánh dấu bao gồm cú pháp và các từ khóa được sử dụng bởi phần mềm MediaWiki để định dạng một trang. Nội dung này được giải thích chi tiết hơn tại Help:Sửa đổi và Trợ giúp:Định dạng. Mã wiki cung cấp sự kết hợp giữa nội dung, mã đánh dấu, macro và siêu dữ liệu. Nội dung của các phiên bản hiện tại và trước đây của một trang wiki nằm trong cơ sở dữ liệu trong bảng text, thường dưới dạng mã wiki, mặc dù một số loại trang, chẳng hạn như các đối tượng Wikidata, được lưu trữ trong các định dạng nội đứng khác.
Tài liệu thành viên
- Help:Wikitext examples
- Help:Downloading pages
- Từ điển thuật ngữ Wikipedia
- Trang trợ giúp Wikipedia về mã wiki
Tài liệu nhà phát triển
- Specs/wikitext/1.0.0 – kể từ tháng 8 năm 2016, URI dùng bởi Parsoid để xác định phiên bản của mã wiki mà nó đang giả định
Cách triển khai
- Trình phân tích cú pháp PHP (PHP Parser) - Tài liệu được tạo từ các bình luận được nhúng trong mã nguồn. Tóm lược về trình phân tích cú pháp PHP như được mô tả trên trang đó: "Processes wiki markup (which uses a more user-friendly syntax, such as "[[Liên kết]]" for making links), and provides a one-way transformation of that wiki markup it into (X)HTML output / markup (which in turn the browser understands, and can display)."
- Parsoid – translation tool for MediaWiki which translates between HTML5 DOM with RDFa and MediaWiki Wikitext.
Testing
We have provided important compatibility information, which helps describe expected behavior for converting wikitext to HTML.
- Parser tests - Our tests in MediaWiki core contain the authoritative source for Wikitext markup compatibility testing.
- Parsoid test cases (parserTests.txt on Diffusion) – a forked version of the MediaWiki core tests, used by Parsoid. Besides the wt2html mode that the PHP parser supports, Parsoid's parser tests runner also enables several other testing modes not supported by the PHP parser (wt2wt, html2wt, html2html, randomized edits for testing selective serialization, manual edits for controlled testing of serialization). These tests are manually synchronized using scripts in the Parsoid codebase.
Discussions from 2015 and later
- Architecture focus 2015 – 2015 discussion at Lyon Hackathon about the future of MediaWiki, including content representation and transclusion
- Requests for comment/A Spec For Wikitext – RFC which defines a framework for writing a Wikitext spec, should we choose to write one (discussed in Phab:E259 in August 2016)
- Handling wiki content beyond plaintext – Discussions planned to occur at WikiDev17
Discussions prior to 2015
- Markup spec – early attempt to use a standard metasyntax (such as Backus–Naur Form) to define MediaWiki Wikitext.
- Parser 2011 – early Parsoid documentation, including a 2011 plan for rolling out a new version.
- Wikitext standard – Page that was active in 2003-2005
- Wikitext/2003 syntax – Quoting the page: I'm just tipping some links onto this page for -- I will clean it up to some sort of coherence later -- Tarquin 16:45, 30 Aug 2003 (UTC)
- Wikitext.next – Brooke Vibber's thoughts from 2011
See also
- Wikitext besides wiki
- Extension:StandardWikitext - Extension that standardizes wikitext on every page save