1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-09-28 14:30:51 +00:00

Math: Increment math uid [#375]

This commit is contained in:
gnosygnu 2019-03-03 16:39:47 -05:00
parent 5c724dc93d
commit a70131254f
3 changed files with 4 additions and 2 deletions

View File

@ -48,6 +48,7 @@ public class Xoae_page implements Xoa_page {
public void Xtn_gallery_packed_exists_y_() {html.Xtn_gallery_packed_exists_y_();}
public boolean Xtn__timeline_exists() {return false;} // drd always sets timeline
public boolean Xtn__gallery_exists() {return false;} // drd does not need to set gallery.style.css
public int Xtn__math_uid__next() {return xtn__math_uid++;} private int xtn__math_uid;
public Xoa_kv_hash Kv_data() {return kv_data;} private final Xoa_kv_hash kv_data = new Xoa_kv_hash();
private Guid_adp page_guid;
public Guid_adp Page_guid() {
@ -83,6 +84,7 @@ public class Xoae_page implements Xoa_page {
hdump.Clear();
wtxt.Clear();
kv_data.Clear();
xtn__math_uid = 0;
lnki_list.Clear();
file_math.Clear();

View File

@ -38,7 +38,7 @@ public class Xoh_page_wtr_mgr_tst {
, "-{zh-hans:A;zh-hant:B;}-"
), String_.Concat_lines_nl_skip_last
( "<span id='xowa_math_txt_0'>x_{1}-1</span>" // not converted
, "<span id='xowa_math_txt_0'>x-{1+2}-1</span>" // not converted
, "<span id='xowa_math_txt_1'>x-{1+2}-1</span>" // not converted
, "A" // converted
));
}

View File

@ -37,7 +37,7 @@ class Xomath_html_wtr {
if (scrubbed_js != null) math_bry = scrubbed_js; // js found; use clean version; DATE:2013-08-26
// if latex, (a) calc md5 and url; (b) write <img> or add to queue
int uid = page.File_math().Count();
int uid = page.Xtn__math_uid__next();
if (is_latex) {
byte[] math_src = subst_mgr.Subst(math_bry);
byte[] md5 = md5_wkr.Hash_bry_as_bry(math_src);