Here’s what I came up with and it works a treat. Now I can use this to accumulate wiki-fied text as I iterate over passages, and I can then calculate a truer story-word-count:
setup.getWikifiedText = function(passageName){
if(Story.has(passageName)){
var passage = Story.get(passageName);
return "<wiki>" + passage.text + "</wiki>";
}else{
return "";
}
};