mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.1.1
This commit is contained in:
@@ -26,7 +26,7 @@ class Xow_popup_anchor_finder {
|
||||
int lhs_bgn = bgn;
|
||||
while (true) {
|
||||
lhs_bgn = Bry_find_.Find_fwd(src, Hdr_bgn, nl_lhs, src_len);
|
||||
if (lhs_bgn == Bry_.NotFound) break; // "\n=" not found; exit;
|
||||
if (lhs_bgn == Bry_find_.Not_found) break; // "\n=" not found; exit;
|
||||
if (Find_hdr(lhs_bgn)) return lhs_bgn;
|
||||
}
|
||||
return Find_id(bgn);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Xow_popup_html_mkr {
|
||||
, String_.new_u8(page.Ttl().Full_txt())
|
||||
, popup_itm.Popup_id()
|
||||
, Xow_popup_html_bldr_.Bld_fmtr_wiki(fmtr_wiki, wrdx_bfr, cur_wiki.Domain_bry(), page.Wiki().Domain_bry()) // NOTE: use cur_wiki, not page_wiki; DATE:2014-06-28
|
||||
, gplx.ios.Io_size_.To_str(page.Data_raw().length)
|
||||
, gplx.core.ios.Io_size_.To_str(page.Data_raw().length)
|
||||
, page.Revision_data().Modified_on().XtoStr_fmt_yyyy_MM_dd_HH_mm_ss()
|
||||
, Xow_popup_html_bldr_.Bld_fmtr_viewed(fmtr_viewed, app, wiki, wrdx_bfr, page.Ttl())
|
||||
, app.Fsys_mgr().Root_dir().To_http_file_bry()
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.htmls.modules.popups; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.modules.*;
|
||||
import gplx.core.btries.*;
|
||||
import gplx.xowa.wikis.domains.*;
|
||||
import gplx.xowa.apps.apis.xowa.html.modules.*; import gplx.xowa.htmls.modules.popups.keeplists.*;
|
||||
import gplx.xowa.apps.apis.xowa.html.modules.*; import gplx.xowa.htmls.modules.popups.keeplists.*; import gplx.xowa.htmls.core.htmls.*;
|
||||
import gplx.xowa.guis.views.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.hdrs.*; import gplx.xowa.parsers.tblws.*; import gplx.xowa.parsers.tmpls.*;
|
||||
public class Xow_popup_parser {
|
||||
@@ -220,7 +220,7 @@ class Xow_popup_parser_ {
|
||||
Xop_tkn_itm tkn = Get_expensive_dangling_tkn(ctx);
|
||||
if (tkn == null) return rv_default; // no expensive tkns found; return rv_default; EX: headers are not considered expensive
|
||||
int tkn_end = Calc_tkn_end(tkn, src, end);
|
||||
if (tkn_end == Bry_.NotFound) return rv_default; // no end found; return rv_default; might want to return src.length at future date
|
||||
if (tkn_end == Bry_find_.Not_found) return rv_default; // no end found; return rv_default; might want to return src.length at future date
|
||||
return tkn_end - bgn;
|
||||
}
|
||||
private static Xop_tkn_itm Get_expensive_dangling_tkn(Xop_ctx ctx) {
|
||||
@@ -242,7 +242,7 @@ class Xow_popup_parser_ {
|
||||
end_bry = Xop_tblw_lxr.Hook_te;
|
||||
break;
|
||||
}
|
||||
if (end_bry == null) return Bry_.NotFound; // no end defined for tkn; return null which should revert to dflt
|
||||
if (end_bry == null) return Bry_find_.Not_found; // no end defined for tkn; return null which should revert to dflt
|
||||
int end_pos = Bry_find_.Find_fwd(src, end_bry, pos);
|
||||
return end_pos == Bry_find_.Not_found ? Bry_find_.Not_found : end_pos + end_bry.length;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class Xow_popup_parser_tst {
|
||||
@Test public void Lnke_text() { // PURPOSE: count entire lnke as one word
|
||||
fxt.Init_tmpl_read_len_(32).Init_word_needed_(5).Test_parse
|
||||
( "a http://b.org c d e f g", String_.Concat_lines_nl_skip_last
|
||||
( "<p>a <a href=\"http://b.org\" class=\"external text\" rel=\"nofollow\">http://b.org</a> c d e"
|
||||
( "<p>a <a href=\"http://b.org\" rel=\"nofollow\" class=\"external free\">http://b.org</a> c d e"
|
||||
, "</p>"
|
||||
));
|
||||
}
|
||||
@@ -507,7 +507,7 @@ class Xop_popup_parser_fxt {
|
||||
}
|
||||
public void Test_Assert_at_end(String raw, String expd) {
|
||||
if (test_bfr == null) test_bfr = Bry_bfr.new_();
|
||||
test_bfr.Clear().Add_str(raw);
|
||||
test_bfr.Clear().Add_str_u8(raw);
|
||||
Bry_bfr_.Assert_at_end(test_bfr, Byte_ascii.Nl);
|
||||
Tfds.Eq(expd, test_bfr.To_str_and_clear());
|
||||
} private Bry_bfr test_bfr;
|
||||
|
||||
@@ -175,7 +175,7 @@ public class Xow_popup_wrdx_mkr {
|
||||
int atrs_len = atrs_ary.length;
|
||||
for (int i = 0; i < atrs_len; i++) {
|
||||
Mwh_atr_itm atr = atrs_ary[i];
|
||||
if ( Bry_.Eq(atr.Key_bry(), Html_atr_.Id_bry)
|
||||
if ( Bry_.Eq(atr.Key_bry(), Html_atr_.Bry__id)
|
||||
&& xnde_id_ignore_list.Get_by_bry(atr.Val_as_bry()) != null
|
||||
) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user