2012-06-28 22:45:17 +00:00
|
|
|
/* -------------------------------------------------------------------
|
|
|
|
* The WikitextConstant structure holds "global constants" that
|
|
|
|
* capture properties about wikitext markup.
|
|
|
|
*
|
|
|
|
* Ex: Valid options for wikitext image markup
|
|
|
|
*
|
|
|
|
* This structure, over time, can come to serve as useful documentation
|
|
|
|
* about Wikitext itself. For now, this is barebones and sparse.
|
|
|
|
* ------------------------------------------------------------------- */
|
|
|
|
|
2012-07-18 19:05:08 +00:00
|
|
|
var WikitextConstants = {
|
2012-06-29 00:08:48 +00:00
|
|
|
// Valid image options:
|
|
|
|
// * Prefix options are of the form "alt=foo"
|
|
|
|
// * Simple options are of the form "center"
|
|
|
|
//
|
|
|
|
// See http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax
|
|
|
|
// for more information about how they are used.
|
2012-06-28 22:45:17 +00:00
|
|
|
Image: {
|
2012-06-29 00:08:48 +00:00
|
|
|
PrefixOptions: {
|
|
|
|
'link' : 'link',
|
|
|
|
'alt' : 'alt',
|
|
|
|
'page' : 'page',
|
|
|
|
'thumbnail': 'thumbnail',
|
|
|
|
'thumb' : 'thumb',
|
|
|
|
'upright' : 'aspect'
|
|
|
|
},
|
2012-06-28 22:45:17 +00:00
|
|
|
SimpleOptions: {
|
|
|
|
// halign
|
2012-06-29 00:08:48 +00:00
|
|
|
'left' : 'halign',
|
|
|
|
'right' : 'halign',
|
2012-06-28 22:45:17 +00:00
|
|
|
'center': 'halign',
|
2012-06-29 00:08:48 +00:00
|
|
|
'float' : 'halign',
|
|
|
|
'none' : 'halign',
|
|
|
|
|
2012-06-28 22:45:17 +00:00
|
|
|
// valign
|
2012-06-29 00:08:48 +00:00
|
|
|
'baseline' : 'valign',
|
|
|
|
'sub' : 'valign',
|
|
|
|
'super' : 'valign',
|
|
|
|
'top' : 'valign',
|
|
|
|
'text-top' : 'valign',
|
|
|
|
'middle' : 'valign',
|
|
|
|
'bottom' : 'valign',
|
2012-06-28 22:45:17 +00:00
|
|
|
'text-bottom': 'valign',
|
2012-06-29 00:08:48 +00:00
|
|
|
|
2012-06-28 22:45:17 +00:00
|
|
|
// format
|
2012-06-29 00:08:48 +00:00
|
|
|
'border' : 'format',
|
2012-06-28 22:45:17 +00:00
|
|
|
'frameless': 'format',
|
2012-06-29 00:08:48 +00:00
|
|
|
'frame' : 'format',
|
2012-06-28 22:45:17 +00:00
|
|
|
'thumbnail': 'format',
|
2012-06-29 00:08:48 +00:00
|
|
|
'thumb' : 'format'
|
2012-06-28 22:45:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (typeof module == "object") {
|
|
|
|
module.exports.WikitextConstants = WikitextConstants;
|
|
|
|
}
|