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

Timeline: Fix many minor timeline bugs [#368]

This commit is contained in:
gnosygnu
2019-03-03 15:33:04 -05:00
parent 3488084eca
commit 5c724dc93d
11 changed files with 8369 additions and 250 deletions

View File

@@ -316,9 +316,11 @@ public class Xoh_html_wtr {
break;
}
case Xop_xnde_tag_.Tid__timeline: {
bfr.Add_str_a7("<div class=\"timeline-wrapper\" style=\"line-height:0;font-size:0\">");
bfr.Add(gplx.xowa.htmls.core.wkrs.addons.timelines.Xoh_timeline_data.Hook_bry);
Xox_mgr_base.Xtn_write_escape(app, bfr, src, xnde.Tag_open_end(), xnde.Tag_close_bgn()); // NOTE: do not embed <timeline> tag inside pre, else timeline will render in black; EX:<pre><timeline>a</timeline></pre> will fail; DATE:2014-05-22
bfr.Add_str_a7("</pre>");
bfr.Add_str_a7("</div>");
break;
}
case Xop_xnde_tag_.Tid__gallery:

View File

@@ -319,7 +319,7 @@ public class Xoh_html_wtr_tst {
fxt.Test_parse_page_wiki_str("<div id='a b'></div>", "<div id='a_b'></div>");
}
@Test public void Timeline() {// PURPOSE: embed timeline contents in pre; DATE:2014-05-22
fxt.Test_parse_page_wiki_str("<timeline>a</timeline>", "<pre class='xowa-timeline'>a</pre>");
fxt.Test_parse_page_wiki_str("<timeline>a</timeline>", "<div class=\"timeline-wrapper\" style=\"line-height:0;font-size:0\"><pre class='xowa-timeline'>a</pre></div>");
}
@Test public void Amp_ncr_should_not_be_rendered_as_bytes() { // PURPOSE: &#160; should be rendered as &#160; not as literal bytes {192,160}; DATE:2013-12-09
fxt.Test_parse_page_wiki_str("a&#160;b", "a&#160;b");