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

Dev: Release bry_bfr in Tag_html_wkr_basic [#351]

This commit is contained in:
gnosygnu
2019-02-05 22:37:45 -05:00
parent ba40cf6c69
commit 571f0a2388
7 changed files with 37 additions and 11 deletions

View File

@@ -44,8 +44,12 @@ public class Lst_pfunc_itm {
// eval tmpl
Bry_bfr tmp_bfr = wiki.Utl__bfr_mkr().Get_m001();
tmpl.Tmpl_evaluate(sub_ctx, Xot_invk_temp.Page_is_caller, tmp_bfr);
sub_src = tmp_bfr.To_bry_and_rls();
try {
tmpl.Tmpl_evaluate(sub_ctx, Xot_invk_temp.Page_is_caller, tmp_bfr);
sub_src = tmp_bfr.To_bry_and_clear();
} finally {
tmp_bfr.Mkr_rls();
}
// parse again
if (!wiki.Parser_mgr().Tmpl_stack_add(ttl.Full_db())) return null; // put template back on stack;

View File

@@ -324,6 +324,7 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
Xoa_ttl end_page_ttl = end_page_bry == null ? null : ary[ary_len - 1];
Bry_bfr page_bfr = wiki.Utl__bfr_mkr().Get_m001();
try {
for (int i = 0; i < ary_len; i++) {
Xoa_ttl ttl = ary[i];
byte[] ttl_page_db = ttl.Page_db();
@@ -351,7 +352,10 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
full_bfr.Add_bfr_and_clear(page_bfr);
full_bfr.Add(gplx.langs.htmls.entitys.Gfh_entity_.Space_bry); // $out.= "&#32;"; REF.MW:ProofreadPageRenderer.pn
}
page_bfr.Mkr_rls();
}
finally {
page_bfr.Mkr_rls();
}
return full_bfr.To_bry_and_clear();
}
private Xop_root_tkn Bld_root_nde(Bry_bfr page_bfr, Hash_adp_bry lst_page_regy, byte[] wikitext) {

View File

@@ -131,8 +131,11 @@ public class Score_xnde implements Xox_xnde, Mwh_atr_itm_owner1, Xoh_cmd_itm {
}
else {
Bry_bfr tmp_bfr = wiki.Utl__bfr_mkr().Get_m001();
ly_text = code_is_raw ? code : score_xtn.Lilypond_fmtr().Bld_bry_many(tmp_bfr, Score_xtn_mgr.Lilypond_version, code);
tmp_bfr.Mkr_rls();
try {
ly_text = code_is_raw ? code : score_xtn.Lilypond_fmtr().Bld_bry_many(tmp_bfr, Score_xtn_mgr.Lilypond_version, code);
} finally {
tmp_bfr.Mkr_rls();
}
Io_mgr.Instance.SaveFilBry(ly_file, ly_text);
}
ly_process.Working_dir_(ly_file.OwnerDir()); // NOTE: must change working_dir, else file will be dumped into same dir as lilypond.exe