1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2025-06-02 15:34:37 +00:00

Table_of_contents: Handle unknown tags: ruby, rb, rp, rt

This commit is contained in:
gnosygnu 2016-10-22 08:58:40 -04:00
parent df45117d43
commit 985c87efbf
3 changed files with 15 additions and 6 deletions

View File

@ -77,8 +77,12 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr
, Id__map = 53
, Id__bdo = 54
, Id__time = 55
, Id__ruby = 56
, Id__rb = 57
, Id__rp = 58
, Id__rt = 59
;
// private static final int Id__ary_max = 54;
// private static final int Id__ary_max = 60;
public static final byte[]
Bry__a = Bry_.new_a7("a")
, Bry__ul = Bry_.new_a7("ul")
@ -101,7 +105,6 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr
// tags_by_bry.Add_bry_int(rv.Key_bry(), id);
// return rv;
// }
public static final Hash_adp_bry Hash = Hash_adp_bry.ci_a7()
.Add_bry_int(Bry__a , Id__a)
.Add_str_int("h1" , Id__h1)
@ -158,6 +161,10 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr
.Add_str_int("map" , Id__map)
.Add_str_int("bdo" , Id__bdo)
.Add_str_int("time" , Id__time)
.Add_str_int("ruby" , Id__ruby)
.Add_str_int("rb" , Id__rb)
.Add_str_int("rp" , Id__rp)
.Add_str_int("rt" , Id__rt)
;
public static String To_str(int tid) {
switch (tid) {
@ -220,6 +227,10 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr
case Id__map: return "map";
case Id__bdo: return "bdo";
case Id__time: return "time";
case Id__ruby: return "ruby";
case Id__rb: return "rb";
case Id__rp: return "rp";
case Id__rt: return "rt";
default: throw Err_.new_unhandled(tid);
}
}

View File

@ -140,7 +140,7 @@ class Xoh_toc_wkr__txt {
int rhs_bgn = -1, rhs_end = -1, new_pos = lhs_end;
if (lhs_is_pair) { // get rhs unless inline
if (tag_id == Gfh_tag_.Id__any) {
Gfo_usr_dlg_.Instance.Warn_many("", "", "unknown tag: page=~{0} tag=~{1}", page_name, lhs_bry);
Gfo_usr_dlg_.Instance.Warn_many("", "", "unknown tag in toc: page=~{0} tag=~{1}", page_name, lhs_bry);
Gfh_tag rhs = tag_rdr.Tag__peek_fwd_tail(lhs_bry);
if (rhs.Name_id() == Gfh_tag_.Id__eos) return false;
rhs_bgn = rhs.Src_bgn(); rhs_end = rhs.Src_end();

View File

@ -28,9 +28,7 @@ public abstract class Xob_sql_dump_base extends Xob_itm_dump_base implements Xob
public Io_url_gen Make_url_gen() {return make_url_gen;} private Io_url_gen make_url_gen;
public abstract String Sql_file_name();
protected abstract Xosql_dump_parser New_parser();
public void Cmd_init(Xob_bldr bldr) {
}
public void Cmd_init(Xob_bldr bldr) {}
public void Cmd_bgn(Xob_bldr bldr) {
this.Init_dump(this.Cmd_key());
make_url_gen = Io_url_gen_.dir_(temp_dir.GenSubDir("make"));