1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.4.3.1'

This commit is contained in:
gnosygnu
2016-04-17 23:47:45 -04:00
parent 14471ca656
commit ad140a93fe
102 changed files with 1278 additions and 382 deletions

View File

@@ -42,9 +42,15 @@ public class Xow_parser_mgr {
Xop_root_tkn root = ctx.Tkn_mkr().Root(page.Data_raw());
if (clear) {page.Clear_all();}
Xoa_ttl ttl = page.Ttl();
if ( Xow_page_tid.Identify(wiki.Domain_tid(), ttl.Ns().Id(), ttl.Page_db()) == Xow_page_tid.Tid_wikitext) // only parse page if wikitext; skip .js, .css, Module; DATE:2013-11-10
main.Parse_text_to_wdom(root, ctx, tkn_mkr, page.Data_raw(), Xop_parser_.Doc_bgn_bos);
if ( Xow_page_tid.Identify(wiki.Domain_tid(), ttl.Ns().Id(), ttl.Page_db()) == Xow_page_tid.Tid_wikitext) { // only parse page if wikitext; skip .js, .css, Module; DATE:2013-11-10
byte[] data_raw = page.Data_raw();
// if (wiki.Domain_tid() == gplx.xowa.wikis.domains.Xow_domain_tid_.Int__home) {
// data_raw = Bry_.Add(Temp__page_title, data_raw);
// }
main.Parse_text_to_wdom(root, ctx, tkn_mkr, data_raw , Xop_parser_.Doc_bgn_bos);
}
page.Root_(root);
root.Data_htm_(root.Root_src());
}
// private static final byte[] Temp__page_title = Bry_.new_a7("{{PageTitle}}");
}

View File

@@ -347,7 +347,7 @@ public class Xot_invk_tkn extends Xop_tkn_itm_base implements Xot_invk {
if ( cache_itm != null
// && Bry_.Eq(cache_itm.Ttl().Full_db(), ctx.Page().Page_ttl().Full_db()) // make sure that transcluded item is not same as page_ttl; DATE:2014-01-10
) {
transclude_src = cache_itm.Wtxt();
transclude_src = cache_itm.Wtxt__direct();
page_ttl = cache_itm.Ttl();
}
}
@@ -372,7 +372,7 @@ public class Xot_invk_tkn extends Xop_tkn_itm_base implements Xot_invk {
}
public static Xot_defn_tmpl Load_defn(Xowe_wiki wiki, Xop_ctx ctx, Xot_invk_tkn invk_tkn, Xoa_ttl ttl, byte[] name_ary) {
Xow_page_cache_itm tmpl_page_itm = wiki.Cache_mgr().Page_cache().Get_or_load_as_itm(ttl);
byte[] tmpl_page_bry = tmpl_page_itm == null ? null : tmpl_page_itm.Wtxt();
byte[] tmpl_page_bry = tmpl_page_itm == null ? null : tmpl_page_itm.Wtxt__direct();
Xot_defn_tmpl rv = null;
if (tmpl_page_bry != null) {
byte old_parse_tid = ctx.Parse_tid(); // NOTE: reusing ctxs is a bad idea; will change Parse_tid and cause strange errors; however, keeping for PERF reasons
@@ -409,7 +409,7 @@ public class Xot_invk_tkn extends Xop_tkn_itm_base implements Xot_invk {
Xow_page_cache_itm cache_itm = wiki.Cache_mgr().Page_cache().Get_or_load_as_itm(page_ttl);
if ( cache_itm != null) {
if (!Bry_.Eq(cache_itm.Ttl().Full_db(), ctx.Page().Ttl().Full_db())) { // make sure that transcluded item is not same as page_ttl; DATE:2014-01-10
transclude_tmpl = ctx.Wiki().Parser_mgr().Main().Parse_text_to_defn_obj(ctx, ctx.Tkn_mkr(), page_ttl.Ns(), page_ttl.Page_db(), cache_itm.Wtxt());
transclude_tmpl = ctx.Wiki().Parser_mgr().Main().Parse_text_to_defn_obj(ctx, ctx.Tkn_mkr(), page_ttl.Ns(), page_ttl.Page_db(), cache_itm.Wtxt__direct());
page_ttl = cache_itm.Ttl();
}
}

View File

@@ -20,8 +20,8 @@ import gplx.xowa.langs.*;
public class Xop_xnde_tag_ {
public static final int Bgn_mode__normal = 0, Bgn_mode__inline = 1;
public static final int End_mode__normal = 0, End_mode__inline = 1, End_mode__escape = 2; // escape is for hr which does not support </hr>
public static final byte[] Bry__onlyinclude = Bry_.new_a7("onlyinclude");
public static final byte[] Bry__end_tag_bgn = Bry_.new_a7("</");
public static final byte[] Bry__onlyinclude = Bry_.new_a7("onlyinclude");
public static final byte[] Bry__end_tag_bgn = Bry_.new_a7("</");
public static final int
Tid__null = -1
, Tid__b = 0
@@ -144,13 +144,13 @@ public class Xop_xnde_tag_ {
, Tid__tabview = 117
;
public static final int Tid__len = 118;
public static final Xop_xnde_tag[] Ary = new Xop_xnde_tag[Tid__len];
public static final Xop_xnde_tag[] Ary = new Xop_xnde_tag[Tid__len];
private static Xop_xnde_tag New(int id, String name) {
Xop_xnde_tag rv = new Xop_xnde_tag(id, name);
Ary[id] = rv;
return rv;
}
public static final Xop_xnde_tag
public static final Xop_xnde_tag
Tag__b = New(Tid__b, "b").No_inline_()
, Tag__strong = New(Tid__strong, "strong").No_inline_()
, Tag__i = New(Tid__i, "i").No_inline_()