Parsing wiki templates calls with Javascript

All that I need is to split the wiki template call to parameter parts. In the very basic scenario it is just splitting by `|` so `{{template|unnamed_parameter|param1=value1}}` would be split to `{{template`, `unnamed_parameter`, `param1=value1` and `}}`. But things are complicating when the pipe character is used for other purposes like for wikilinks `[[link|title]]` etc. Any suggestions how to do this task in the easiest way? :) **Update:** Sorry for possible misunderstanding but `{{template|unnamed_parameter|param1=value1}}` is just an example. For more information about wiki templates you can look at the following resource: [http://www.mediawiki.org/wiki/Help:Templates][1] [1]: http://www.mediawiki.org/wiki/Help:Templates

以上就是Parsing wiki templates calls with Javascript的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏