*/
public static PluginContent parsePluginLine(WikiContext context, String commandline, int pos) throws PluginException {
PatternMatcher matcher = new Perl5Matcher();
try {
PluginManager pm = context.getEngine().getPluginManager();
if (matcher.contains(commandline, pm.getPluginPattern())) {
MatchResult res = matcher.getMatch();
String plugin = res.group(2);
String args = commandline.substring(res.endOffset(0),
commandline.length() -
(commandline.charAt(commandline.length() - 1) == '}' ? 1 : 0));
Map<String, String> arglist = pm.parseArgs(args);
// set wikitext bounds of plugin as '_bounds' parameter, e.g., [345,396]
if (pos != -1) {
int end = pos + commandline.length() + 2;
String bounds = pos + "|" + end;