Browse Source

maint: code style and typo fix

wangweimin 5 năm trước cách đây
mục cha
commit
3574109ccf
3 tập tin đã thay đổi với 11 bổ sung3 xóa
  1. 2 0
      .gitattributes
  2. 5 1
      docs/index.rst
  3. 4 2
      pywebio/html/js/pywebio.js

+ 2 - 0
.gitattributes

@@ -1,3 +1,5 @@
+# https://github.com/github/linguist#overrides
+
 pywebio/html/js/* linguist-vendored
 pywebio/html/css/* linguist-vendored
 pywebio/html/codemirror/* linguist-vendored

+ 5 - 1
docs/index.rst

@@ -21,6 +21,10 @@ Install
 
    pip3 install pywebio
 
+Pypi上的包更新可能滞后,可以使用以下命令安装开发版本::
+
+    pip3 install https://code.aliyun.com/wang0618/pywebio/repository/archive.zip
+
 **系统要求**: PyWebIO要求 Python 版本在 3.5.2 及以上
 
 .. _hello_word:
@@ -94,7 +98,7 @@ Indices and tables
 Discussion and support
 ----------------------
 
-* Need help when use PyWebIO? Send me Email ``wang0.618&qq.com`` (replace ``&`` whit ``@`` ).
+* Need help when use PyWebIO? Send me Email ``wang0.618&qq.com`` (replace ``&`` with ``@`` ).
 
 * Report bugs on the `GitHub issue <https://github.com/wang0618/pywebio/issues>`_.
 

+ 4 - 2
pywebio/html/js/pywebio.js

@@ -601,7 +601,7 @@
             'help_text': '',
             'options': '',
             'datalist': '',
-            'multiple':''
+            'multiple': ''
         };
         for (var key in this.spec) {
             if (key in ignore_keys) continue;
@@ -675,7 +675,9 @@
                 'matchBrackets': true,  //括号匹配
                 'lineWrapping': true,  //自动换行
             };
-            for (var k in that.spec.code) config[k] = that.spec.code[k];
+            for (var k in that.spec.code)
+                config[k] = that.spec.code[k];
+
             CodeMirror.autoLoadMode(that.code_mirror, config.mode);
             if (config.theme)
                 load_codemirror_theme(config.theme);