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

v2.11.2.1

This commit is contained in:
gnosygnu
2015-11-08 23:48:07 -05:00
parent b990ec409f
commit d9f45cec19
298 changed files with 3908 additions and 2141 deletions

View File

@@ -108,7 +108,7 @@ public class Xow_hdr_mgr {
break;
case Xop_tkn_itm_.Tid_lnki:
Xop_lnki_tkn lnki = (Xop_lnki_tkn)sub;
if (lnki.Ns_id() == Xow_ns_.Id_category) {} // Category text should not print; DATE:2013-12-09
if (lnki.Ns_id() == Xow_ns_.Tid__category) {} // Category text should not print; DATE:2013-12-09
else {
if (lnki.Caption_exists())
Id_bld_recurse(raw_bfr, src, lnki.Caption_val_tkn());

View File

@@ -134,13 +134,13 @@ public class Xow_toc_mgr implements Bry_fmtr_arg {
break;
case Xop_tkn_itm_.Tid_lnki:
Xop_lnki_tkn lnki = (Xop_lnki_tkn)sub;
if (lnki.Ns_id() == Xow_ns_.Id_category
if (lnki.Ns_id() == Xow_ns_.Tid__category
&& !lnki.Ttl().ForceLiteralLink()) {} // Category text should not print; DATE:2013-12-09
else {
if (lnki.Caption_exists())
Toc_text_recurse(ctx, bfr, src, html_wtr, html_wtr_opts, lnki.Caption_val_tkn(), depth);
else {
if (lnki.Ns_id() == Xow_ns_.Id_file) {} // do not print lnk_ttl in TOC; if file; tr.w:Dünya_Mirasları; DATE:2014-06-06
if (lnki.Ns_id() == Xow_ns_.Tid__file) {} // do not print lnk_ttl in TOC; if file; tr.w:Dünya_Mirasları; DATE:2014-06-06
else
bfr.Add(lnki.Ttl_ary());
}

View File

@@ -17,9 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*;
import org.junit.*; import gplx.xowa.parsers.*; import gplx.xowa.htmls.core.htmls.*;
public class Xow_toc_mgr_tst {
private Xow_toc_mgr_fxt fxt = new Xow_toc_mgr_fxt();
@Before public void init() {fxt.Clear();}
public class Xow_toc_mgr_tst {
@Before public void init() {fxt.Clear();} private final Xow_toc_mgr_fxt fxt = new Xow_toc_mgr_fxt();
@Test public void Basic() {
fxt.Test_html_toc(String_.Concat_lines_nl_skip_last
( "==a=="
@@ -294,7 +293,7 @@ public class Xow_toc_mgr_tst {
@Test public void Xnde_nest_inline() { // PURPOSE: do not render inline xndes; EX: Magnetic_resonance_imaging
fxt.Test_html_all(String_.Concat_lines_nl_skip_last
( "__FORCETOC__"
, "==a<span id='b'>b<br/></span>=="
, "==a<span id=\"b\">b<br/></span>=="
)
, String_.Concat_lines_nl
( fxt.toc_tbl_nl_n
@@ -519,6 +518,7 @@ class Xow_toc_mgr_fxt {
Tfds.Eq_ary(String_.SplitLines_nl(expd), String_.SplitLines_nl(tmp.To_str_and_clear()), raw);
}
public void Test_html_all(String raw, String expd) {
expd = Xoh_consts.Escape_apos(expd);
fxt.Wtr_cfg().Toc__show_(Bool_.Y);
toc_mgr.Clear();
fxt.Test_parse_page_all_str(raw, expd);