mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v1.10.2.1
This commit is contained in:
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// byte[] fmt = (byte[])hash.Get_by_mid(raw, 0, colon_pos); if (fmt == null) return null;
|
||||
// Bry_bfr tmp_bfr = app.Utl_bry_bfr_mkr().Get_b512();
|
||||
// fmtr.Fmt_(fmt).Bld_bfr_many(tmp_bfr, Bry_.Mid(raw, colon_pos + Int_.Const_dlm_len, raw.length));
|
||||
// return tmp_bfr.Mkr_rls().XtoAryAndClear();
|
||||
// return tmp_bfr.Mkr_rls().Xto_bry_and_clear();
|
||||
// }
|
||||
// public void Clear() {hash.Clear();}
|
||||
// public void Add_one(byte[] alias, byte[] wiki_key) {hash.Add_bry_obj(alias, wiki_key);}
|
||||
|
||||
@@ -21,9 +21,9 @@ public class Xoac_wiki_cfg_bldr_cmd {
|
||||
public String Key() {return key;} private String key;
|
||||
public String Text() {return text;} private String text;
|
||||
public String Exec(String_bldr sb, String wiki, String src) {
|
||||
String sect_txt_bgn = sb.Add("// ").Add(key).Add(".bgn\n").XtoStrAndClear();
|
||||
String sect_txt_end = sb.Add("// ").Add(key).Add(".end\n").XtoStrAndClear();
|
||||
String sect_txt_all = sb.Add(sect_txt_bgn).Add(text + "\n").Add(sect_txt_end).XtoStrAndClear(); // NOTE: always add \n; convenience for single line cmds
|
||||
String sect_txt_bgn = sb.Add("// ").Add(key).Add(".bgn\n").Xto_str_and_clear();
|
||||
String sect_txt_end = sb.Add("// ").Add(key).Add(".end\n").Xto_str_and_clear();
|
||||
String sect_txt_all = sb.Add(sect_txt_bgn).Add(text + "\n").Add(sect_txt_end).Xto_str_and_clear(); // NOTE: always add \n; convenience for single line cmds
|
||||
// int sect_pos_bgn = String_.FindFwd(src, sect_txt_bgn);
|
||||
// if (sect_pos_bgn == String_.Find_none) // new cmd; add to end of file
|
||||
return src + sect_txt_all;
|
||||
@@ -31,7 +31,7 @@ public class Xoac_wiki_cfg_bldr_cmd {
|
||||
// if (sect_pos_end == String_.Find_none)
|
||||
// throw Err_.new_("section_fail: " + wiki + " " + key);
|
||||
// try {
|
||||
// return sb.Add(String_.Mid(src, 0, sect_pos_bgn)).Add(sect_txt_all).Add(String_.Mid(src, sect_pos_end + String_.Len(sect_txt_end), String_.Len(text))).XtoStrAndClear();
|
||||
// return sb.Add(String_.Mid(src, 0, sect_pos_bgn)).Add(sect_txt_all).Add(String_.Mid(src, sect_pos_end + String_.Len(sect_txt_end), String_.Len(text))).Xto_str_and_clear();
|
||||
// } catch (Exception e) {Err_.Noop(e); throw Err_.new_("section_fail: " + wiki + " " + key);}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user