Closed strefethen closed 3 years ago
You may try:
wikitext =`{{plainlist
|*{{Jct|state=CA|SR|24}} in Oakland
*{{Jct|state=CA|SR|123}} in [[Berkeley, California|Berkeley]]<!--might as well include it, since there are two lines-->
}}`;
parsed = CeL.wiki.parse(wikitext);
and using parsed to do something.
You may also try the wikitext parser to see what parsed
looks like.
Ah, thanks! I imported CeL and that worked.
Hi kanasimi, I just started using this to parse content from wikipedia and I'm fetching infobox content and I would like to wikitext parse some sub-elements of the content. For example, the infobox has a string like this:
{{plainlist\n|*{{Jct|state=CA|SR|24}} in Oakland\n*{{Jct|state=CA|SR|123}} in [[Berkeley, California|Berkeley]]<!--might as well include it, since there are two lines-->\n}}
I'd like to use the parser to parse this string to allow easier processing and it's not clear to me if this is possible with the current implementation. Ultimately, it looks like surfacing the parsing in CeJS to wikiapi but am I missing some alternative?
Thanks, -Steve