Skip to content

Commit 5555f88

Browse files
committed
docs exampwes fix
1 parent 7060df4 commit 5555f88

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/main/java/ch/njol/skript/doc/HTMLGenerator.java

+17-16
Original file line numberDiff line numberDiff line change
@@ -373,22 +373,6 @@ else if (!filesInside.getName().matches("(?i)(.*)\\.(html?|js|css|json)")) {
373373

374374
page = page.replace(page.substring(generate, nextBracket + 1), generated.toString());
375375

376-
// skwipt
377-
String ogTitle = "Skript Documentation";
378-
String ogDesc = "Skript is a Bukkit plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.";
379-
String homepageDesc = "is (surprise, surprise) a scripting plugin for the Bukkit platform. It is easy to use for simple tasks, but you can also create really complex things with it. The syntax of Skript is close to English, but it is still not magic. While you might succeed with experimentation for simple tasks, for anything more complex you will need some guidance.";
380-
String homepageDesc2 = "This is Skript's documentation. You will find all supported features of the plugin here, along with some useful examples. We don't have tutorials yet, but you can find good ones using whatever search engine you prefer.";
381-
Pattern exampleCode = Pattern.compile("command /sethome:.*?You have been teleported.");
382-
Pattern skriptPattern = Pattern.compile("(?<=[a-zA-Z0-9]|^|>)([Ss]kript)");
383-
page = page.replace(ogTitle, introduceSkwipt(ogTitle));
384-
page = page.replace(ogDesc, introduceSkwipt(ogDesc));
385-
page = page.replace(homepageDesc, introduceSkwipt(homepageDesc));
386-
page = page.replace(homepageDesc2, introduceSkwipt(homepageDesc2));
387-
Matcher exampleMatcher = exampleCode.matcher(page);
388-
Matcher skriptMatcher = skriptPattern.matcher(page);
389-
page = exampleMatcher.replaceAll(introduceSkwipt(exampleMatcher.group(0)));
390-
page = skriptMatcher.replaceAll(introduceSkwipt(skriptMatcher.group(1)));
391-
392376
generate = page.indexOf("${generate", nextBracket);
393377
}
394378

@@ -398,6 +382,23 @@ else if (!filesInside.getName().matches("(?i)(.*)\\.(html?|js|css|json)")) {
398382
assert page != null;
399383
page = minifyHtml(page);
400384
}
385+
386+
// skwipt
387+
String ogTitle = "Skript Documentation";
388+
String ogDesc = "Skript is a Bukkit plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.";
389+
String homepageDesc = "is (surprise, surprise) a scripting plugin for the Bukkit platform. It is easy to use for simple tasks, but you can also create really complex things with it. The syntax of Skript is close to English, but it is still not magic. While you might succeed with experimentation for simple tasks, for anything more complex you will need some guidance.";
390+
String homepageDesc2 = "This is Skript's documentation. You will find all supported features of the plugin here, along with some useful examples. We don't have tutorials yet, but you can find good ones using whatever search engine you prefer.";
391+
Pattern exampleCode = Pattern.compile("command /sethome:.*?You have been teleported.");
392+
Pattern skriptPattern = Pattern.compile("(?<=[a-zA-Z0-9]|^|>)([Ss]kript)");
393+
page = page.replace(ogTitle, introduceSkwipt(ogTitle));
394+
page = page.replace(ogDesc, introduceSkwipt(ogDesc));
395+
page = page.replace(homepageDesc, introduceSkwipt(homepageDesc));
396+
page = page.replace(homepageDesc2, introduceSkwipt(homepageDesc2));
397+
Matcher exampleMatcher = exampleCode.matcher(page);
398+
page = exampleMatcher.replaceAll(introduceSkwipt(exampleMatcher.group(0)));
399+
Matcher skriptMatcher = skriptPattern.matcher(page);
400+
page = skriptMatcher.replaceAll(introduceSkwipt(skriptMatcher.group(1)));
401+
401402
assert page != null;
402403
writeFile(new File(output + File.separator + name), page);
403404
}

0 commit comments

Comments
 (0)