File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -762,7 +762,7 @@ function module_code(library_namespace) {
762762 if ( false && promise ) {
763763 console . trace ( [ index + '/' + length , depth , promise ,
764764 modify_by_return ] ) ;
765- promise . then ( function ( r ) {
765+ promise = promise . then ( function ( r ) {
766766 console
767767 . trace ( [ r , index + '/' + length , depth ,
768768 promise ] ) ;
@@ -895,6 +895,7 @@ function module_code(library_namespace) {
895895 : [ 'for_each_subelement.skip_inner: skip children' ] ,
896896 // CeL.wiki.parser.parser_prototype.each.remove_token
897897 // for_each_subelement.remove_token: remove current children token
898+ // c.f. CeL.wiki.parse.replace_parameter.KEY_remove_parameter
898899 remove_token : typeof Symbol === 'function' ? Symbol ( 'REMOVE_TOKEN' )
899900 : [ 'for_each_subelement.skip_inner: remove current token' ] ,
900901 ref_name_templates : [ 'R' ]
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ function module_code(library_namespace) {
7676 /**
7777 * 將 parameters 形式的 object 轉成 wikitext。
7878 *
79+ * 警告: 不保證 template_object 的順序!
80+ *
7981 * @example <code>
8082
8183 CeL.wiki.parse.template_object_to_wikitext('t', {
@@ -397,6 +399,7 @@ function module_code(library_namespace) {
397399 </code>
398400 *
399401 * @see 20190912.fix_Infobox_company.js, 20190913.move_link.js
402+ * @see CeL.wiki.parse.template_object_to_wikitext()
400403 *
401404 * @param {Array }template_token
402405 * 由 wiki_API.parse === parse_wikitext() 獲得之 template_token
@@ -464,9 +467,10 @@ function module_code(library_namespace) {
464467 var index = replace_from === KEY_template_name ? 0
465468 : template_token . index_of [ replace_from ] ;
466469 if ( ! ( index >= 0 ) ) {
467- // 不存在此 parameter name 可 replace。
470+ // 不存在此 parameter name 可 replace。新 parameter。
468471 if ( replace_to !== KEY_remove_parameter
469- && options . value_only && options . force_add ) {
472+ && replace_to !== undefined && options . value_only
473+ && options . force_add ) {
470474 // options.preserve_spacing
471475 if ( ! options . no_value_space
472476 //
You can’t perform that action at this time.
0 commit comments