mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.4.1
This commit is contained in:
@@ -170,7 +170,7 @@ public class Arg_bldr {
|
||||
trim = false;
|
||||
switch (wkr_typ) {
|
||||
case Xop_arg_wkr_.Typ_prm : trim = arg_idx == 0; break;
|
||||
case Xop_arg_wkr_.Typ_tmpl: trim = true; break; // NOTE: was "key_exists || arg_idx == 0;"; PAGE:s.w:Gothic_architecture; DATE:2015-11-07
|
||||
case Xop_arg_wkr_.Typ_tmpl: trim = key_exists || arg_idx == 0; break; // NOTE: never set "trim = true"; PAGE:fr.w:Histoire_de_la_marine_française_sous_Louis_XV_et_Louis_XVI DATE:2015-11-17
|
||||
case Xop_arg_wkr_.Typ_lnki: trim = !cur_itm_is_key; break;
|
||||
}
|
||||
if (trim) {
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.parsers.tmpls; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
import gplx.core.brys.*; import gplx.xowa.wikis.nss.*;
|
||||
public class Xot_defn_tmpl implements Xot_defn {
|
||||
public byte Defn_tid() {return Xot_defn_.Tid_tmpl;}
|
||||
public boolean Defn_require_colon_arg() {return false;}
|
||||
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.parsers.tmpls; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
|
||||
import gplx.core.envs.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.kwds.*; import gplx.xowa.langs.vnts.*; import gplx.xowa.langs.vnts.converts.*; import gplx.xowa.langs.funcs.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
import gplx.xowa.wikis.caches.*; import gplx.xowa.xtns.scribunto.*; import gplx.xowa.xtns.pfuncs.*; import gplx.xowa.xtns.pfuncs.ttls.*; import gplx.xowa.wikis.pages.*;
|
||||
|
||||
@@ -233,7 +233,7 @@ public class Xot_invk_wkr_basic_tst {
|
||||
fxt.Init_defn_clear();
|
||||
fxt.Init_defn_add("test_1", "{{test_2|{{{1}}}}}");
|
||||
fxt.Init_defn_add("test_2", "{{{1}}}");
|
||||
fxt.Test_parse_tmpl_str("{{test_1| a }}", " a"); // tmpl.trim_end: always trim end; DATE:2015-11-07
|
||||
fxt.Test_parse_tmpl_str("{{test_1| a }}", " a ");
|
||||
fxt.Init_defn_clear();
|
||||
}
|
||||
@Test public void Ws_trimmed_key_1() { // PURPOSE: trim prm when passed as key;
|
||||
@@ -254,7 +254,7 @@ public class Xot_invk_wkr_basic_tst {
|
||||
fxt.Init_defn_clear();
|
||||
fxt.Init_defn_add("test_1", "{{test_2|1={{{1}}}{{{2}}}}}");
|
||||
fxt.Init_defn_add("test_2", "{{{1}}}");
|
||||
fxt.Test_parse_tmpl_str("{{test_1| a | b }}", "a b"); // tmpl.trim_end: always trim end; DATE:2015-11-07
|
||||
fxt.Test_parse_tmpl_str("{{test_1| a | b }}", "a b");
|
||||
fxt.Init_defn_clear();
|
||||
}
|
||||
@Test public void Ws_eval_prm() { // PURPOSE: skip ws in prm_idx; EX:it.w:Portale:Giochi_da_tavolo; it.w:Template:Alternate; DATE:2014-02-09
|
||||
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.parsers.tmpls; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
|
||||
import gplx.core.envs.*;
|
||||
import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.miscs.*;
|
||||
public class Xot_tmpl_wtr {
|
||||
public byte[] Write_all(Xop_ctx ctx, Xop_root_tkn root, byte[] src) {
|
||||
|
||||
Reference in New Issue
Block a user