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

'v3.6.3.1'

This commit is contained in:
gnosygnu
2016-06-19 23:58:10 -04:00
parent 96636f3161
commit d4e8590345
1960 changed files with 20790 additions and 9272 deletions

View File

@@ -23,7 +23,7 @@ public class Xop_xowa_cmd_tst {
@Before public void init() {
Xoa_gfs_mgr.Msg_parser_init();
fxt.Reset();
} private final Xop_fxt fxt = new Xop_fxt();
} private final Xop_fxt fxt = new Xop_fxt();
@Test public void Basic() {
GfsCore.Instance.AddCmd(fxt.App(), Xoae_app.Invk_app);
fxt.Wiki().Sys_cfg().Xowa_cmd_enabled_(false);
@@ -62,7 +62,7 @@ public class Xop_xowa_cmd_tst {
, ""
));
}
// @Test public void Wiki_list_fmtrs() {
// @Test public void Xow_list_fmtrs() {
// fxt.Wiki().Sys_cfg().Xowa_cmd_enabled_(true);
// fxt.App().Setup_mgr().Maint_mgr().Wiki_mgr().Add(Bry_.new_a7("en.wikipedia.org"));
// fxt.Test_parse_page_all_str(String_.Concat_lines_nl_skip_last

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.xtns.xowa_cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import gplx.langs.htmls.*; import gplx.xowa.htmls.core.htmls.*;
import gplx.xowa.parsers.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.htmls.*;
import gplx.xowa.wikis.pages.*;
import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*;
public class Xox_xowa_html_cmd implements Xox_xnde, Mwh_atr_itm_owner2 {
private byte tag_pos = Xo_custom_html_pos_.Tid__head_end, tag_type = Xo_custom_html_type_.Tid__css_code;
public void Xatr__set(Xowe_wiki wiki, byte[] src, Mwh_atr_itm xatr, byte xatr_id) {
@@ -47,7 +47,8 @@ public class Xox_xowa_html_cmd implements Xox_xnde, Mwh_atr_itm_owner2 {
// add to custom tags
Xopg_html_data html_data = ctx.Page().Html_data();
Xopg_tag_mgr tag_mgr = tag_pos == Xo_custom_html_pos_.Tid__tail ? html_data.Custom_tail_tags() : html_data.Custom_head_tags();
tag_mgr.Add(new Xopg_tag_itm(name, raw));
Xopg_tag_itm tag_itm = Bry_.Eq(name, Gfh_tag_.Bry__style) ? Xopg_tag_itm.New_css_code(raw) : Xopg_tag_itm.New_js_code(raw);
tag_mgr.Add(tag_itm);
}
public void Xtn_write(Bry_bfr bfr, Xoae_app app, Xop_ctx ctx, Xoh_html_wtr html_wtr, Xoh_wtr_ctx hctx, Xop_xnde_tkn xnde, byte[] src) {}

View File

@@ -17,25 +17,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.xowa_cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*;
import gplx.xowa.htmls.*; import gplx.xowa.guis.*; import gplx.xowa.wikis.pages.*;
import gplx.xowa.htmls.*; import gplx.xowa.guis.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*;
import gplx.xowa.parsers.*;
public class Xox_xowa_html_cmd_tst {
@Before public void init() {fxt.Clear();} private Xox_xowa_html_cmd_fxt fxt = new Xox_xowa_html_cmd_fxt();
@Before public void init() {Xopg_tag_wtr.Loader_as_script_static = Bool_.N; fxt.Clear();} private Xox_xowa_html_cmd_fxt fxt = new Xox_xowa_html_cmd_fxt();
@Test public void term() {Xopg_tag_wtr.Loader_as_script_static = Bool_.Y;}
@Test public void Head_end() {
fxt.Test_parse_w_skin
( "<xowa_html pos='head_end'>test</xowa_html>"
, "<html><head><style>\ntest\n</style>\n</head><body></body></html>"
, "<html><head><style data-source=\"xowa\" type=\"text/css\">\ntest\n</style>\n</head><body></body></html>"
);
}
@Test public void Tail() {
fxt.Test_parse_w_skin
( "<xowa_html pos='tail'>test</xowa_html>"
, "<html><head></head><body></body><style>\ntest\n</style>\n</html>"
, "<html><head></head><body></body><style data-source=\"xowa\" type=\"text/css\">\ntest\n</style>\n</html>"
);
}
}
class Xox_xowa_html_cmd_fxt {
private Bry_bfr bfr = Bry_bfr.reset_(16);
private Bry_bfr bfr = Bry_bfr_.Reset(16);
private final Xop_fxt fxt = new Xop_fxt();
private Xowe_wiki wiki; private Xow_html_mgr html_mgr;
public void Clear() {