维基文本

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Wikitext and the translation is 6% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎Tagalog • ‎català • ‎español • ‎français • ‎galego • ‎lietuvių • ‎polski • ‎português • ‎português do Brasil • ‎suomi • ‎čeština • ‎Ελληνικά • ‎русский • ‎سنڌي • ‎বাংলা • ‎සිංහල • ‎ไทย • ‎中文 • ‎日本語

维基文本Wikitext)是使用Wiki标记语言写成的文本内容,比如目前在Help:编辑 中进行说明的内容(也参见Markup spec/DTD )。它是内容、标记符以及元数据的集合体。全部Wiki页面的当前文本和历史文本均以Wiki文本的形式被存储在数据库的文本表中。

User documentation

Developer documentation

  • Specs/wikitext/1.0.0 - as of August 2016, the URI used by Parsoid to identify the version of Wikitext it is assuming

Alternatives to MediaWiki Wikitext

  • Wikitax - 2002 proposal
  • Lightweight markup language - Wikipedia article describing markup languages for cases "where it may be necessary to read the raw document as well as the final rendered output"

Implementation

  • PHP Parser - Generated documentation from comments embedded in the source code. A summary of what the PHP parser is as described on that page: "Processes wiki markup (which uses a more user-friendly syntax, such as "[[链接]]" 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

Discussions prior to 2015