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
2016-01-28 11:29:27 -05:00
parent 686d56fdab
commit 52c36aa4f8
138 changed files with 1415 additions and 646 deletions

View File

@@ -67,7 +67,7 @@ public class Ref_html_wtr {
}
public void Xnde_references(Xoh_html_wtr wtr, Xop_ctx ctx, Xoh_wtr_ctx opts, Bry_bfr bfr, byte[] src, Xop_xnde_tkn xnde) {
References_nde references = (References_nde)xnde.Xnde_xtn();
Ref_itm_lst lst = ctx.Cur_page().Ref_mgr().Lst_get(references.Group(), references.List_idx()); // get group; EX: <references group="note"/>
Ref_itm_lst lst = ctx.Page().Ref_mgr().Lst_get(references.Group(), references.List_idx()); // get group; EX: <references group="note"/>
if (lst == null) return; // NOTE: possible to have a grouped references without references; EX: Infobox planet; <references group=note> in sidebar, but no refs
if (lst.Itms_len() == 0) return;
bfr.Add(cfg.Grp_bgn());

View File

@@ -53,7 +53,7 @@ public class Ref_nde implements Xox_xnde, Mwh_atr_itm_owner {
nested = true; // refs nested in references don't show <a> entry in <references>
}
if (!ctx.Ref_ignore()) // sub_ctx may be marked to ignore <ref>; EX: <pages>,{{#lst}}; DATE:2014-04-24
ctx.Cur_page().Ref_mgr().Grps_add(group, name, follow, this);
ctx.Page().Ref_mgr().Grps_add(group, name, follow, this);
this.xnde = xnde;
}
public void Xtn_write(Bry_bfr bfr, Xoae_app app, Xop_ctx ctx, Xoh_html_wtr html_wtr, Xoh_wtr_ctx hctx, Xop_xnde_tkn xnde, byte[] src) {

View File

@@ -31,7 +31,7 @@ public class References_nde implements Xox_xnde, Mwh_atr_itm_owner {
}
public void Xtn_parse(Xowe_wiki wiki, Xop_ctx ctx, Xop_root_tkn root, byte[] src, Xop_xnde_tkn xnde) {
if (ctx.Tid_is_popup()) return;
Ref_itm_mgr ref_mgr = ctx.Cur_page().Ref_mgr();
Ref_itm_mgr ref_mgr = ctx.Page().Ref_mgr();
if (ref_mgr.References__recursing()) return; // skip nested <references> else refs will be lost; EX:"<references><references/></references>"; PAGE:en.w:Hwair; DATE:2014-06-27
ctx.Para().Process_block__bgn_n__end_y(Xop_xnde_tag_.Tag_div); // xnde generates <block_node>; <references> -> <ol>; close any blocks; PAGE:fr.w:Heidi_(roman); DATE:2014-02-17
Xox_xnde_.Xatr__set(wiki, this, xatrs_hash, src, xnde);