【发布时间】:2015-02-20 16:42:43
【问题描述】:
我有这段氚文本,我将使用它来删除一段 javascript 代码。
# to remove an inline js code based on text search
$("//script[contains(text(),'textiwanttoremove')]") {
text(){
replace('thetextiwanttoremove','')
}
}
但是,此代码不起作用。我收到一个错误,
Failed to create body.ts transformer:
scripts/main.ts:13: function Text.$(Text) does not exist in namespace tritium; (called from Text.with(Regexp)).
另外,如果我用inner()替换text(),还是不行,谢谢。
【问题讨论】: