#define SHARE_AUTHDB 1
//#define WIKICOMPAT 1
-//#define TABLECOMPATFLAG 1
+//#define WIKITABLEATTRIB 1
+//#define WIKITABLECOMPATFLAG 1
//#define WIKIMOTORPRE 1
//#define COMPAT_STORAGE_CREATE 1
//#define HTTPS_NOCACHE 1
halign = HAlignNone;
valign = VAlignNone;
fnowrap = false;
+#ifdef WIKITABLEATTRIB
fnoborder = false;
cellspacing = -1;
cellpadding = -1;
+#endif
fpadding = false;
// halign = HAlignNone;
fnowhite = false;
} else {
switch (selector2) {
case SEL_TABLE:
+#ifdef WIKITABLEATTRIB
if (match (key, CharConst ("cellspacing"), CharConst ("spc"))) {
paramUNum (vval.textOut (wiki), cellspacing, key);
} else if (match (key, CharConst ("cellpadding"))) {
} else {
return false;
}
+#else
+ return false;
+#endif
break;
case SEL_TR:
case SEL_TD:
} else {
switch (selector2) {
case SEL_TABLE:
+#ifdef WIKITABLEATTRIB
if (match (key, CharConst ("noborder"), CharConst ("nb"))) {
fnoborder = true;
- } else if (match (key, CharConst ("padding"), CharConst ("pad"))) {
+ } else
+#endif
+ if (match (key, CharConst ("padding"), CharConst ("pad"))) {
fpadding = true;
} else if (match (key, CharConst ("expanding"), CharConst ("expand"))) {
fpadding = false;
switch (selector2) {
case SEL_TABLE:
+#ifdef WIKITABLEATTRIB
wiki->outputName (out, CharConst ("border"), fnoborder ? 0 : 1, false);
wiki->outputName (out, CharConst ("cellspacing"), cellspacing, false);
wiki->outputName (out, CharConst ("cellpadding"), cellpadding, false);
+#endif
break;
case SEL_TR:
case SEL_TD:
/*
WIKIMOTORPRE: セットすると,フォーマット済みテキストブロックの中でインライン要素の解釈を行う。
UTF8JP: セットすると,条件によりパラグラフ内の改行を空白に置き換えない。
- TABLECOMPATFLAG: セットすると,旧形式の表の継続記号もゆるす。
+ WIKITABLECOMPATFLAG: セットすると,旧形式の表の継続記号もゆるす。
*/
#define kComment "//"
|table:||c:||
|h:名前|h:省略形|h:意味|
-|noborder|nb|border="0"を出力する。|
-|cellspacing=''integer''|spc=|cellspacing属性を出力する。|
-|cellpadding=''integer''||cellpadding属性を出力する。|
+//|noborder|nb|border="0"を出力する。|
+//|cellspacing=''integer''|spc=|cellspacing属性を出力する。|
+//|cellpadding=''integer''||cellpadding属性を出力する。|
|padding|pad|テーブルの最大のカラム数よりカラムが少ない行に,空のカラムを追加する。|
|expanding|expand|テーブルの最大のカラム数よりカラムが少ない行の最後のカラムを引き延ばす。|
|center|c|テーブルをセンタリングする。|
}
WikiBlock::closeType WikiBlockTable::closeLine (uiterator b, uiterator e) {
-#ifdef TABLECOMPATFLAG
+#ifdef WIKITABLECOMPATFLAG
static uregex re ("^\\}\\}(($)|(\\|)|((!([1-9][0-9]*))?(\\\\|&)$))");
#else
static uregex re ("^\\}\\}(($)|(\\|)|((!([1-9][0-9]*))?(&)$))");
CellList_t* cols;
bool fmorecell = false;
umatch m;
-#ifdef TABLECOMPATFLAG
+#ifdef WIKITABLECOMPATFLAG
static uregex re ("(!([1-9][0-9]*))?(\\\\|&)$");
#else
static uregex re ("(!([1-9][0-9]*))?(&)$");
void WikiBlockTable::outputTableTag (MotorOutput* out) {
int i;
+#ifdef WIKITABLEATTRIB
if (attrib.cellspacing < 0)
attrib.cellspacing = 0;
if (attrib.cellpadding < 0)
attrib.cellpadding = 0;
+#endif
out->out_raw (CharConst ("<table"));
attrib.output (out);
out->out_raw (CharConst (">\n"));