1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-09-20 23:43:51 -04:00
parent 5fe27b5b3b
commit fa70c05354
1056 changed files with 8375 additions and 7095 deletions

View File

@@ -16,16 +16,18 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*; import gplx.xowa.parsers.paras.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
import gplx.xowa.parsers.paras.*;
public class Xop_comm_lxr implements Xop_lxr {
public byte Lxr_tid() {return Xop_lxr_.Tid_comment;}
public int Lxr_tid() {return Xop_lxr_.Tid_comment;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {core_trie.Add(Bgn_ary, this);}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int lhs_end = cur_pos;
int end_pos = Bry_finder.Find_fwd(src, End_ary, cur_pos, src_len); // search for "-->" // NOTE: do not reuse cur_pos, else cur_pos may become -1 and fatal error in ctx.Msg_log() below; DATE:2014-06-08
int end_pos = Bry_find_.Find_fwd(src, End_ary, cur_pos, src_len); // search for "-->" // NOTE: do not reuse cur_pos, else cur_pos may become -1 and fatal error in ctx.Msg_log() below; DATE:2014-06-08
int rhs_bgn = end_pos;
if (end_pos == Bry_finder.Not_found) { // "-->" not found
if (end_pos == Bry_find_.Not_found) { // "-->" not found
ctx.Msg_log().Add_itm_none(Xop_comm_log.Eos, src, bgn_pos, cur_pos);
cur_pos = src_len; // gobble up rest of content
}

View File

@@ -16,13 +16,12 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
public class Xop_cr_lxr implements Xop_lxr {
public byte Lxr_tid() {return Xop_lxr_.Tid_cr;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {
core_trie.Add(Byte_ascii.Cr, this);
}
public int Lxr_tid() {return Xop_lxr_.Tid_cr;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {core_trie.Add(Byte_ascii.Cr, this);}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
return cur_pos; //ignore
}

View File

@@ -16,14 +16,16 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*; import gplx.xowa.parsers.paras.*; import gplx.xowa.parsers.tmpls.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
import gplx.xowa.parsers.paras.*; import gplx.xowa.parsers.tmpls.*;
public class Xop_eq_lxr implements Xop_lxr {
public Xop_eq_lxr(boolean tmpl_mode) {this.tmpl_mode = tmpl_mode;} boolean tmpl_mode;
public byte Lxr_tid() {return Xop_lxr_.Tid_eq;}
public int Lxr_tid() {return Xop_lxr_.Tid_eq;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {core_trie.Add(Byte_ascii.Eq, this);}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
cur_pos = Bry_finder.Find_fwd_while(src, cur_pos, src_len, Byte_ascii.Eq); // gobble up eq; "==" should produce 1 eq_tkn with len of 2, not 2 eq_tkn with len of 1; DATE:2014-04-17
cur_pos = Bry_find_.Find_fwd_while(src, cur_pos, src_len, Byte_ascii.Eq); // gobble up eq; "==" should produce 1 eq_tkn with len of 2, not 2 eq_tkn with len of 1; DATE:2014-04-17
int eq_len = cur_pos - bgn_pos;
boolean hdr_like = false;
if (tmpl_mode) {
@@ -34,7 +36,7 @@ public class Xop_eq_lxr implements Xop_lxr {
if (prv_pos > -1 && src[prv_pos] == Byte_ascii.Nl) // is prv char \n; EX: "\n==="
hdr_like = true;
else {
int eol_pos = Bry_finder.Find_fwd_while_space_or_tab(src, cur_pos, src_len); // skip trailing ws; EX: "== \n"; PAGE:nl.q:Geert_Wilders; DATE:2014-06-05
int eol_pos = Bry_find_.Find_fwd_while_space_or_tab(src, cur_pos, src_len); // skip trailing ws; EX: "== \n"; PAGE:nl.q:Geert_Wilders; DATE:2014-06-05
if ( eol_pos == src_len // eos
|| src[eol_pos] == Byte_ascii.Nl // cur_pos is \n; EX: "===\n"
) {
@@ -55,15 +57,15 @@ public class Xop_eq_lxr implements Xop_lxr {
ctx.Subs_add(root, tkn_mkr.Eq(bgn_pos, cur_pos));
return cur_pos;
}
int ws_end = Bry_finder.Find_fwd_while_space_or_tab(src, cur_pos, src_len);
int ws_end = Bry_find_.Find_fwd_while_space_or_tab(src, cur_pos, src_len);
hdr_like = ws_end == src_len || src[ws_end] == Byte_ascii.Nl; // hdr_like if next char \n or eos
if (!hdr_like) {
int ctg_end = Xop_nl_lxr.Scan_fwd_for_ctg(ctx, src, cur_pos, src_len); // check if ==[[Category:A]]; DATE:2014-04-17
if ( ctg_end != Bry_.NotFound) { // [[Category: found
ctg_end = Bry_finder.Find_fwd(src, Xop_tkn_.Lnki_end, ctg_end, src_len);
ctg_end = Bry_find_.Find_fwd(src, Xop_tkn_.Lnki_end, ctg_end, src_len);
if (ctg_end != Bry_.NotFound) { // ]] found; note that this should do more validation; EX: [[Category:]] should not be valid; DATE:2014-04-17
ctg_end += Xop_tkn_.Lnki_end_len;
ctg_end = Bry_finder.Find_fwd_while_space_or_tab(src, ctg_end, src_len);
ctg_end = Bry_find_.Find_fwd_while_space_or_tab(src, ctg_end, src_len);
if (ctg_end == src_len || src[ctg_end] == Byte_ascii.Nl) // hdr_like if ]]\n after [[Category:A]]
hdr_like = true;
}

View File

@@ -16,12 +16,13 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
import gplx.xowa.parsers.xndes.*;
public class Xop_hr_lxr implements Xop_lxr {
public byte Lxr_tid() {return Xop_lxr_.Tid_hr;}
public class Xop_hr_lxr implements Xop_lxr {
public int Lxr_tid() {return Xop_lxr_.Tid_hr;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr parse_trie) {parse_trie.Add(Hook_ary, this);} static final byte[] Hook_ary = new byte[] {Byte_ascii.Nl, Byte_ascii.Dash, Byte_ascii.Dash, Byte_ascii.Dash, Byte_ascii.Dash};
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int nl_adj = -1; // -1 to ignore nl at bgn for hr_len
boolean bos = bgn_pos == Xop_parser_.Doc_bgn_bos;
@@ -31,7 +32,7 @@ public class Xop_hr_lxr implements Xop_lxr {
}
ctx.Apos().EndFrame(ctx, root, src, bgn_pos, false);
ctx.CloseOpenItms(ctx, tkn_mkr, root, src, src_len, bgn_pos, cur_pos); // close open items
cur_pos = Bry_finder.Find_fwd_while(src, cur_pos, src_len, Hook_byt); // gobble consecutive dashes
cur_pos = Bry_find_.Find_fwd_while(src, cur_pos, src_len, Hook_byt); // gobble consecutive dashes
if (!bos)
ctx.Para().Process_nl(ctx, root, src, bgn_pos, bgn_pos); // simulate \n in front of ----
ctx.Para().Process_block__bgn_y__end_n(Xop_xnde_tag_.Tag_hr); // para=n; block=y

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.tests.*;
public class Xop_ignore_tkn_chkr extends Xop_tkn_chkr_base {
@Override public Class<?> TypeOf() {return Xop_ignore_tkn.class;}
@Override public byte Tkn_tid() {return Xop_tkn_itm_.Tid_ignore;}

View File

@@ -0,0 +1,35 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
public class Xop_macro_lxr implements Xop_lxr {
public Xop_macro_lxr() {}
public int Lxr_tid() {return Xop_lxr_.Tid_macro;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {core_trie.Add(Byte_ascii.Tab, this); core_trie.Add(Xop_tab_tkn.Bry_tab_ent, this);}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
cur_pos = Bry_find_.Find_fwd_while(src, cur_pos, src_len, Byte_ascii.Tab);
src[bgn_pos] = Byte_ascii.Tab; // HACK: SEE:NOTE_1:tabs
for (int i = bgn_pos + 1; i < cur_pos; i++)
src[i] = Byte_ascii.Space;
ctx.Subs_add(root, tkn_mkr.Tab(bgn_pos, cur_pos));
return cur_pos;
}
public static final Xop_tab_lxr _ = new Xop_tab_lxr();
}

View File

@@ -16,11 +16,13 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*; import gplx.xowa.parsers.tblws.*; import gplx.xowa.parsers.lnkis.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
import gplx.xowa.parsers.tblws.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.parsers.vnts.*;
public class Xop_pipe_lxr implements Xop_lxr {
public byte Lxr_tid() {return Xop_lxr_.Tid_pipe;}
public int Lxr_tid() {return Xop_lxr_.Tid_pipe;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {core_trie.Add(Byte_ascii.Pipe, this);}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int cur_stack_tid = ctx.Cur_tkn_tid(), rv = -1;
switch (cur_stack_tid) {
@@ -61,7 +63,7 @@ public class Xop_pipe_lxr implements Xop_lxr {
return cur_pos;
}
case Xop_tkn_itm_.Tid_vnt:
gplx.xowa.langs.vnts.Xop_vnt_tkn vnt_tkn = (gplx.xowa.langs.vnts.Xop_vnt_tkn)ctx.Stack_get_typ(Xop_tkn_itm_.Tid_vnt);
Xop_vnt_tkn vnt_tkn = (Xop_vnt_tkn)ctx.Stack_get_typ(Xop_tkn_itm_.Tid_vnt);
vnt_tkn.Vnt_pipe_tkn_count_add_();
ctx.Subs_add(root, tkn_mkr.Pipe(bgn_pos, cur_pos));
return cur_pos;

View File

@@ -16,13 +16,14 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
public class Xop_space_lxr implements Xop_lxr {
public byte Lxr_tid() {return Xop_lxr_.Tid_space;}
public int Lxr_tid() {return Xop_lxr_.Tid_space;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {core_trie.Add(Byte_ascii.Space, this);}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
cur_pos = Bry_finder.Find_fwd_while(src, cur_pos, src_len, Byte_ascii.Space);
cur_pos = Bry_find_.Find_fwd_while(src, cur_pos, src_len, Byte_ascii.Space);
ctx.Subs_add(root, tkn_mkr.Space(root, bgn_pos, cur_pos));
return cur_pos;
}

View File

@@ -16,16 +16,14 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
public class Xop_tab_lxr implements Xop_lxr {
public byte Lxr_tid() {return Xop_lxr_.Tid_tab;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {
core_trie.Add(Byte_ascii.Tab, this);
core_trie.Add(Xop_tab_tkn.Bry_tab_ent, this);
}
public int Lxr_tid() {return Xop_lxr_.Tid_tab;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {core_trie.Add(Byte_ascii.Tab, this); core_trie.Add(Xop_tab_tkn.Bry_tab_ent, this);}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
cur_pos = Bry_finder.Find_fwd_while(src, cur_pos, src_len, Byte_ascii.Tab);
cur_pos = Bry_find_.Find_fwd_while(src, cur_pos, src_len, Byte_ascii.Tab);
src[bgn_pos] = Byte_ascii.Tab; // HACK: SEE:NOTE_1:tabs
for (int i = bgn_pos + 1; i < cur_pos; i++)
src[i] = Byte_ascii.Space;

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.tests.*;
public class Xop_tkn_chkr_hr extends Xop_tkn_chkr_base {
@Override public Class<?> TypeOf() {return Xop_hr_tkn.class;}
@Override public byte Tkn_tid() {return Xop_tkn_itm_.Tid_hr;}

View File

@@ -16,11 +16,11 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import gplx.core.btries.*;
import gplx.core.btries.*; import gplx.xowa.langs.*;
import gplx.xowa.html.tocs.*;
public class Xop_under_lxr implements Xop_lxr {
private Btrie_mgr words_trie_ci, words_trie_cs;
public byte Lxr_tid() {return Xop_lxr_.Tid_under;}
public int Lxr_tid() {return Xop_lxr_.Tid_under;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {
Xol_kwd_mgr kwd_mgr = lang.Kwd_mgr();
@@ -64,6 +64,7 @@ public class Xop_under_lxr implements Xop_lxr {
}
}
}
public void Term(Btrie_fast_mgr core_trie) {}
private static final int[] under_kwds = new int[] // REF.MW:MagicWord.php
{ Xol_kwd_grp_.Id_toc, Xol_kwd_grp_.Id_notoc, Xol_kwd_grp_.Id_forcetoc
, Xol_kwd_grp_.Id_nogallery, Xol_kwd_grp_.Id_noheader, Xol_kwd_grp_.Id_noeditsection
@@ -114,9 +115,10 @@ public class Xop_under_lxr implements Xop_lxr {
class Xop_word_lxr implements Xop_lxr {
private int kwd_id;
public Xop_word_lxr(int kwd_id) {this.kwd_id = kwd_id;}
public byte Lxr_tid() {return Xop_lxr_.Tid_word;}
public int Lxr_tid() {return Xop_lxr_.Tid_word;}
public void Init_by_wiki(Xowe_wiki wiki, Btrie_fast_mgr core_trie) {}
public void Init_by_lang(Xol_lang lang, Btrie_fast_mgr core_trie) {}
public void Term(Btrie_fast_mgr core_trie) {}
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
Xop_under_lxr.Make_tkn(ctx, tkn_mkr, root, src, src_len, bgn_pos, cur_pos, kwd_id); // for now, all word_lxrs only call the under_lxr; DATE:2014-02-14
return cur_pos;

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.parsers.miscs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.*;
import org.junit.*;
import org.junit.*; import gplx.xowa.langs.*;
public class Xop_under_lxr_tst {
private Xop_fxt fxt = new Xop_fxt();
@Before public void init() {fxt.Reset();}
@@ -142,13 +142,13 @@ public class Xop_under_lxr_tst {
@Test public void Hook_alt() { // PURPOSE: ja wikis use alternate __; DATE:2014-03-04
Xowe_wiki wiki = fxt.Wiki(); Xol_lang lang = wiki.Lang();
fxt.Init_lang_kwds(lang, Xol_kwd_grp_.Id_toc, true, "__TOC__");
wiki.Parser().Init_by_lang(lang);
wiki.Parser_mgr().Main().Init_by_lang(lang);
fxt.Test_parse_page_all_str("a__TOC__b", "ab");
}
@Test public void Ascii_ci() { // PURPOSE: case-insensitive ascii; DATE:2014-07-10
Xowe_wiki wiki = fxt.Wiki(); Xol_lang lang = wiki.Lang();
fxt.Init_lang_kwds(lang, Xol_kwd_grp_.Id_toc, false, "__TOC__");
wiki.Parser().Init_by_lang(lang);
wiki.Parser_mgr().Main().Init_by_lang(lang);
fxt.Test_parse_page_all_str("a__TOC__b", "ab");
fxt.Test_parse_page_all_str("a__toc__b", "ab");
}
@@ -156,7 +156,7 @@ public class Xop_under_lxr_tst {
Xowe_wiki wiki = fxt.Wiki(); Xol_lang lang = wiki.Lang();
lang.Case_mgr_u8_();
fxt.Init_lang_kwds(lang, Xol_kwd_grp_.Id_toc, false, "__AÉI__");
wiki.Parser().Init_by_lang(lang);
wiki.Parser_mgr().Main().Init_by_lang(lang);
fxt.Test_parse_page_all_str("a__AÉI__b", "ab");
fxt.Test_parse_page_all_str("a__aéi__b", "ab");
}
@@ -164,13 +164,13 @@ public class Xop_under_lxr_tst {
Xowe_wiki wiki = fxt.Wiki(); Xol_lang lang = wiki.Lang();
lang.Case_mgr_u8_();
fxt.Init_lang_kwds(lang, Xol_kwd_grp_.Id_toc, false, "__İÇİNDEKİLER__"); // __TOC__ for tr.w
wiki.Parser().Init_by_lang(lang);
wiki.Parser_mgr().Main().Init_by_lang(lang);
fxt.Test_parse_page_all_str("a__İçindekiler__b", "ab");
}
@Test public void Cs() { // PURPOSE: cs (ascii / utf8 doesn't matter); DATE:2014-07-11
Xowe_wiki wiki = fxt.Wiki(); Xol_lang lang = wiki.Lang();
fxt.Init_lang_kwds(lang, Xol_kwd_grp_.Id_toc , Bool_.Y, "__TOC__");
wiki.Parser().Init_by_lang(lang);
wiki.Parser_mgr().Main().Init_by_lang(lang);
fxt.Test_parse_page_all_str("a__TOC__b" , "ab"); // ci.pass
fxt.Test_parse_page_all_str("a__toc__b" , "a__toc__b"); // ci.pass
}
@@ -178,7 +178,7 @@ public class Xop_under_lxr_tst {
Xowe_wiki wiki = fxt.Wiki(); Xol_lang lang = wiki.Lang();
fxt.Init_lang_kwds(lang, Xol_kwd_grp_.Id_toc , Bool_.N, "__TOC__");
fxt.Init_lang_kwds(lang, Xol_kwd_grp_.Id_notoc , Bool_.Y, "__NOTOC__");
wiki.Parser().Init_by_lang(lang);
wiki.Parser_mgr().Main().Init_by_lang(lang);
fxt.Test_parse_page_all_str("a__TOC__b" , "ab"); // ci.pass
fxt.Test_parse_page_all_str("a__toc__b" , "ab"); // ci.pass
fxt.Test_parse_page_all_str("a__NOTOC__b" , "ab"); // cs.pass