OSDN Git Service

disable the textarea hack by default.
authorvisor <visor@users.sourceforge.jp>
Sun, 26 Feb 2017 15:04:13 +0000 (00:04 +0900)
committervisor <visor@users.sourceforge.jp>
Sun, 26 Feb 2017 15:04:13 +0000 (00:04 +0900)
update the table function.

config.h
modules/ml-texp.cc
wiki/wikiattrib.cc
wiki/wikiattrib.h

index 57372d2..9832a6f 100644 (file)
--- a/config.h
+++ b/config.h
@@ -31,5 +31,6 @@
 //#define  QUERYENCODEALT              1
 #define  STANDALONE            1
 #define FreeBSDPortsIConv      1
+//#define  INSERTTABHACK               1
 
 #endif /* CONFIG_H */
index bdc4418..617467e 100644 (file)
@@ -567,6 +567,7 @@ MNode*  ml_table (MNode* cell, MlEnv* mlenv) {
        nextNode (arg);
        if (isCons (v ())) {
            ans ()->tablePut (to_string (v ()->car ()), v ()->cdr ());
+       } else if (isNil (v ())) {
        } else {
            throw (uErrorWrongType);
        }
index c3efeb6..7f91eff 100644 (file)
@@ -669,8 +669,10 @@ bool  WikiAttribInput::readAttribMore2 (const ustring& key, WikiMotorObjVec& cel
        pdefault = true;
     } else if ((selector2 & SEL_CHECK) && match (key, CharConst ("checked"))) {
        pchecked = true;
+#ifdef INSERTTABHACK
     } else if ((selector2 & SEL_TEXTAREA) && match (key, CharConst ("tab"))) {
        ftab = true;
+#endif
     } else {
        return false;
     }
@@ -706,6 +708,7 @@ void  WikiAttribInput::outputMore (MotorOutput* out) {
            //  out->out_raw (CharConst (" wrap=\"physical\""));
            break;
        }
+#ifdef INSERTTABHACK
        if (ftab) {
            out->out_raw (uSPC)
                ->out_raw (CharConst ("onkeypress"))
@@ -723,6 +726,7 @@ void  WikiAttribInput::outputMore (MotorOutput* out) {
                ->out_toHTML (ustring (CharConst ("return insertTab(event,this);")))
                ->out_raw (uQ2);
        }
+#endif
     }
     if (paccept.length () > 0) {
        out->out_raw (CharConst (" accept=\""))
index c11490d..eca7cfb 100644 (file)
@@ -181,7 +181,9 @@ class  WikiAttribInput: public WikiAttrib1 {
     enum {
        W_OFF, W_SOFT, W_HARD,
     }  pwrap;
+#ifdef INSERTTABHACK
     bool  ftab;
+#endif
 
     WikiAttribInput (WikiFormat* _wiki, uint32_t _sel2): WikiAttrib1 (_wiki, SEL_MULTIPLE2, false, M_ATTRIB) {
        selector2 = _sel2;
@@ -189,7 +191,9 @@ class  WikiAttribInput: public WikiAttrib1 {
        pdefault = false;
        pchecked = false;
        pwrap = W_SOFT;
+#ifdef INSERTTABHACK
        ftab = false;
+#endif
     };
     virtual  ~WikiAttribInput () {};
  private: