mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v3.1.4.2
This commit is contained in:
@@ -46,7 +46,7 @@ public class Xoa_sitelink_div_wtr {
|
||||
byte[] ttl_bry = ttl.Page_txt_w_anchor();
|
||||
boolean ttl_is_empty = false;
|
||||
if (Bry_.Len_eq_0(ttl_bry)) { // NOTE: handles ttls like [[fr:]] and [[:fr;]] which have an empty Page_txt, but a valued Full_txt_raw
|
||||
ttl_bry = wiki.Parser_mgr().Ctx().Cur_page().Ttl().Page_txt();
|
||||
ttl_bry = wiki.Parser_mgr().Ctx().Page().Ttl().Page_txt();
|
||||
ttl_is_empty = true;
|
||||
}
|
||||
itm.Init_by_page(slink.Domain_info(), ttl_bry, ttl_is_empty, slink.Badges());
|
||||
|
||||
@@ -48,7 +48,7 @@ class Xoa_sitelink_div_wtr_fxt {
|
||||
Xoae_app app;
|
||||
public void tst(String raw, String expd) {
|
||||
Xop_ctx ctx = wiki.Parser_mgr().Ctx();
|
||||
ctx.Cur_page().Ttl_(Xoa_ttl.parse(wiki, Bry_.new_a7("test_page")));
|
||||
ctx.Page().Ttl_(Xoa_ttl.parse(wiki, Bry_.new_a7("test_page")));
|
||||
byte[] raw_bry = Bry_.new_u8(raw);
|
||||
Bry_bfr bfr = Bry_bfr.new_();
|
||||
Xop_root_tkn root = ctx.Tkn_mkr().Root(raw_bry);
|
||||
@@ -56,7 +56,7 @@ class Xoa_sitelink_div_wtr_fxt {
|
||||
wiki.Html_mgr().Html_wtr().Write_all(bfr, ctx, raw_bry, root);
|
||||
|
||||
Bry_bfr html_bfr = Bry_bfr.new_();
|
||||
wiki.App().Xwiki_mgr__sitelink_mgr().Write_html(html_bfr, wiki, ctx.Cur_page().Slink_list(), gplx.xowa.xtns.wdatas.Wdata_xwiki_link_wtr.Qid_null);
|
||||
wiki.App().Xwiki_mgr__sitelink_mgr().Write_html(html_bfr, wiki, ctx.Page().Slink_list(), gplx.xowa.xtns.wdatas.Wdata_xwiki_link_wtr.Qid_null);
|
||||
Tfds.Eq_str_lines(expd, html_bfr.To_str_and_clear());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user