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

Table_of_contents: Ignore NOTOC commands at template level

This commit is contained in:
gnosygnu
2017-06-17 10:34:29 -04:00
parent a439f53c1a
commit e2e68342e0
13 changed files with 121 additions and 24 deletions

View File

@@ -59,8 +59,10 @@ public class Xowe_hdr_bldr_fxt {
);
}
public static String Bld_page_with_toc(Bry_bfr bfr, Xop_fxt fxt, String raw) {
String rv = fxt.Exec_parse_page_all_as_str(raw);
bfr.Add_str_u8(rv);
gplx.xowa.parsers.Xop_root_tkn root = fxt.Exec_parse_page_all_as_root(Bry_.new_u8(raw));
fxt.Ctx().Page_data().Copy_to(fxt.Page());
fxt.Wiki().Html_mgr().Html_wtr().Write_doc(bfr, fxt.Ctx(), fxt.Hctx(), root.Root_src(), root);
gplx.xowa.htmls.core.wkrs.tocs.Xoh_toc_wtr.Write_toc(bfr, fxt.Page(), Xoh_wtr_ctx.Basic);
return bfr.To_str_and_clear();
}

View File

@@ -31,7 +31,7 @@ public class Xoctg_single_box {
private static final Bry_fmt Fmt__grp = Bry_fmt.Auto_nl_skip_last
( "<div id=\"catlinks\" class=\"catlinks\">"
, "<div id=\"mw-normal-catlinks\" class=\"mw-normal-catlinks\">"
, "~{grp_lbl}"
, "~{grp_lbl}:"
, "<ul>~{grp_itms}"
, "</ul>"
, "</div>"