1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-07-19 23:16:49 -04:00
parent 794b5a232f
commit 8e041d6e06
834 changed files with 4749 additions and 4461 deletions

View File

@@ -22,7 +22,7 @@ public class Xop_xatr_parser { // REF.MW:Sanitizer.php|decodeTagAttributes;MW_AT
private static final byte Mode_atr_bgn = 1, Mode_invalid = 2, Mode_key = 3, Mode_eq = 4, Mode_val_bgn = 5, Mode_val_quote = 6, Mode_val_raw = 7;
private byte mode = Mode_atr_bgn;
private int atr_bgn = -1, key_bgn = -1, key_end = -1, eq_pos = -1, val_bgn = -1, val_end = -1; boolean valid = true;
private byte quote_byte = Byte_ascii.Nil;
private byte quote_byte = Byte_ascii.Null;
private final Hash_adp_bry repeated_atrs_hash = Hash_adp_bry.ci_ascii_(); // ASCII:xnde_atrs
private final Bry_bfr key_bfr = Bry_bfr.new_(), val_bfr = Bry_bfr.new_();
private boolean key_bfr_on = false, val_bfr_on = false, ws_is_before_val = false;
@@ -376,7 +376,7 @@ public class Xop_xatr_parser { // REF.MW:Sanitizer.php|decodeTagAttributes;MW_AT
}
if (val_bfr_on) xatr.Val_bry_(val_bfr.Xto_bry_and_clear());
xatrs.Add(xatr);
mode = Mode_atr_bgn; quote_byte = Byte_ascii.Nil; valid = true;
mode = Mode_atr_bgn; quote_byte = Byte_ascii.Null; valid = true;
atr_bgn = key_bgn = val_bgn = key_end = val_end = eq_pos = -1;
val_bfr_on = key_bfr_on = ws_is_before_val = false;
}

View File

@@ -239,7 +239,7 @@ public class Xop_xatr_whitelist_mgr {
return b;
}
}
return Byte_ascii.Nil;
return Byte_ascii.Null;
}
static final byte Style_expression = 0, Style_filter = 1, Style_accelerator = 2, Style_url = 3, Style_urls = 4, Style_comment = 5, Style_image = 6, Style_image_set = 7;
private static Btrie_slim_mgr style_trie = Btrie_slim_mgr.ci_ascii_() // NOTE:ci.ascii:Javascript

View File

@@ -24,7 +24,7 @@ public class Xop_xnde_tag_regy {
case Xop_parser_.Parse_tid_tmpl: return tag_regy_tmpl;
case Xop_parser_.Parse_tid_page_tmpl: return tag_regy_wiki_tmpl;
case Xop_parser_.Parse_tid_page_wiki: return tag_regy_wiki_main;
default: return tag_regy_wiki_tmpl; //throw Exc_.new_unhandled(i);
default: return tag_regy_wiki_tmpl; //throw Err_.new_unhandled(i);
}
} boolean nild = true;
public void Init() {

View File

@@ -666,7 +666,7 @@ public class Xop_xnde_wkr implements Xop_ctx_wkr {
case Xop_xnde_tag_.Tid_listing_sleep: xnde_xtn = tkn_mkr.Xnde_listing(tag_id); break;
case Xop_xnde_tag_.Tid_timeline:
boolean log_wkr_enabled = Timeline_log_wkr != Xop_log_basic_wkr.Null; if (log_wkr_enabled) Timeline_log_wkr.Log_end_xnde(ctx.Cur_page(), Xop_log_basic_wkr.Tid_timeline, src, xnde);
ctx.Cur_page().Html_data().Module_mgr().Itm__timeline().Enabled_y_();
ctx.Cur_page().Html_data().Head_mgr().Itm__timeline().Enabled_y_();
break;
case Xop_xnde_tag_.Tid_xowa_tag_bgn:
case Xop_xnde_tag_.Tid_xowa_tag_end:
@@ -691,9 +691,9 @@ public class Xop_xnde_wkr implements Xop_ctx_wkr {
catch (Exception e) {
String err_msg = String_.Format("failed to render extension: title={0} excerpt={1} err={2}", ctx.Cur_page().Ttl().Full_txt()
, Bry_.Mid(src, xnde.Tag_open_end(), xnde.Tag_close_bgn())
, Err_.Message_gplx_brief(e));
, Err_.Message_gplx_log(e));
if (Env_.Mode_testing())
throw Exc_.new_exc(e, "xo", err_msg);
throw Err_.new_exc(e, "xo", err_msg);
else
ctx.Wiki().Appe().Usr_dlg().Warn_many("", "", err_msg);
}