mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.9.2.1'
This commit is contained in:
@@ -45,7 +45,7 @@ public class Xow_parser_mgr {
|
||||
wbase__time__msgs = Wdata_hwtr_msgs.new_(wiki.Msg_mgr());
|
||||
return wbase__time__msgs;
|
||||
} private Wdata_hwtr_msgs wbase__time__msgs;
|
||||
public int Tag__next_idx() {return ++tag_idx;} private int tag_idx; // NOTE:must be wiki-level variable, not page-level, b/c pre-compiled templates can reserve tag #s; PAGE:de.s:Seite:NewtonPrincipien.djvu/465 DATE:2015-02-03
|
||||
public int Tag__next_idx() {return ++tag_idx;} private int tag_idx; // NOTE:must be wiki-level variable, not page-level, b/c pre-compiled templates can reserve tag #s; PAGE:de.s:Seite:NewtonPrincipien.djvu/465 DATE:2015-02-03
|
||||
public void Tmpl_stack_del() {--tmpl_stack_ary_len;}
|
||||
public boolean Tmpl_stack_add(byte[] key) {
|
||||
for (int i = 0; i < tmpl_stack_ary_len; i++) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Xop_link_parser {
|
||||
raw = tmp_bfr.To_bry_and_clear();
|
||||
html_anchor_cls = Xoh_lnki_consts.Tid_a_cls_none;
|
||||
Xow_domain_itm domain_itm = Xow_domain_itm_.parse(wiki_bry);
|
||||
html_anchor_rel = domain_itm.Domain_type().Tid() == Xow_domain_tid_.Int__other ? Xoh_lnki_consts.Tid_a_rel_nofollow : Xoh_lnki_consts.Tid_a_rel_none; // rel=nofollow if not WM wiki; DATE:2015-11-19
|
||||
html_anchor_rel = domain_itm.Domain_type().Tid() == Xow_domain_tid_.Tid__other ? Xoh_lnki_consts.Tid_a_rel_nofollow : Xoh_lnki_consts.Tid_a_rel_none; // rel=nofollow if not WM wiki; DATE:2015-11-19
|
||||
break;
|
||||
case Gfo_protocol_itm.Tid_file: // "file:///" or "File:A.png"
|
||||
int proto_len = Gfo_protocol_itm.Bry_file.length; // "file:"
|
||||
|
||||
@@ -98,7 +98,7 @@ public class Xop_lnki_wkr implements Xop_ctx_wkr, Xop_arg_wkr {
|
||||
int bgn = arg.Val_tkn().Dat_bgn(), end = arg.Val_tkn().Dat_end();
|
||||
if (arg.KeyTkn_exists()) {bgn = arg.Key_tkn().Dat_bgn(); end = arg.Key_tkn().Dat_end();}
|
||||
arg_tid = ctx.Wiki().Lang().Lnki_arg_parser().Identify_tid(src, bgn, end, lnki);
|
||||
if (arg_tid == Xop_lnki_arg_parser.Tid_caption && ctx.Wiki().Domain_itm().Domain_type_id() == gplx.xowa.wikis.domains.Xow_domain_tid_.Int__other) {
|
||||
if (arg_tid == Xop_lnki_arg_parser.Tid_caption && ctx.Wiki().Domain_itm().Domain_type_id() == gplx.xowa.wikis.domains.Xow_domain_tid_.Tid__other) {
|
||||
if (end > bgn && Bry_.Eq(src, bgn, end, Xop_lnki_arg_parser.Bry_target))
|
||||
arg_tid = Xop_lnki_arg_parser.Tid_target;
|
||||
}
|
||||
|
||||
@@ -88,8 +88,7 @@ public class Xot_invk_tkn extends Xop_tkn_itm_base implements Xot_invk {
|
||||
if ( name_ary_len == 0 // name is blank; can occur with failed inner tmpl; EX: {{ {{does not exist}} }}
|
||||
|| name_bgn == name_ary_len // name is ws; EX: {{test| }} -> {{{{{1}}}}}is whitespace String; PAGE:en.d:wear_one's_heart_on_one's_sleeve; EX:{{t+|fr|avoir le cœur sur la main| }}
|
||||
) {
|
||||
Gfo_usr_dlg_.Instance.Warn_many("", "", "parser.tmpl:dynamic is blank; page~{0}", ctx.Page().Url_bry_safe());
|
||||
bfr.Add_str_a7("(? [[dynamic is blank]] ?)");
|
||||
Gfo_usr_dlg_.Instance.Log_many("", "", "parser.tmpl:dynamic is blank; page=~{0}", ctx.Page().Url_bry_safe()); // downgraded from warning to note; PAGE:de.d:país DATE:2016-09-07
|
||||
return false;
|
||||
}
|
||||
if (name_ary[name_bgn] == Byte_ascii.Colon) { // check 1st letter for transclusion
|
||||
|
||||
@@ -262,7 +262,7 @@ public class Xot_invk_wkr__basic__tst {
|
||||
@Test public void Ws_arg() { // PURPOSE: whitespace arg should not throw array index out of bounds; EX.WIKT: wear one's heart on one's sleeve
|
||||
fxt.Init_defn_clear();
|
||||
fxt.Init_defn_add("test_1", "{{{{{1}}}}}");
|
||||
fxt.Test_parse_tmpl_str("{{test_1| }}", "(? [[dynamic is blank]] ?)");
|
||||
fxt.Test_parse_tmpl_str("{{test_1| }}", "");
|
||||
fxt.Init_defn_clear();
|
||||
}
|
||||
@Test public void Xnde_xtn_ref_not_arg() { // PURPOSE: <ref name= should not be interpreted as arg; EX: {{tmp|a<ref name="b"/>}}; arg1 is a<ref name="b"/> not "b"; PAGE:en.w:WWI
|
||||
|
||||
@@ -319,7 +319,7 @@ public class Xop_xnde_wkr implements Xop_ctx_wkr {
|
||||
if (tag.Restricted()) {
|
||||
Xoae_page page = ctx.Page();
|
||||
if ( page.Html_data().Html_restricted()
|
||||
&& page.Wiki().Domain_tid() != Xow_domain_tid_.Int__home) {
|
||||
&& page.Wiki().Domain_tid() != Xow_domain_tid_.Tid__home) {
|
||||
int end_pos = gtPos + 1;
|
||||
ctx.Subs_add(root, tkn_mkr.Bry_raw(bgn_pos, end_pos, Bry_.Add(Gfh_entity_.Lt_bry, Bry_.Mid(src, bgn_pos + 1, end_pos)))); // +1 to skip <
|
||||
return end_pos;
|
||||
|
||||
Reference in New Issue
Block a user