diff --git a/src/main/java/ch/njol/skript/doc/HTMLGenerator.java b/src/main/java/ch/njol/skript/doc/HTMLGenerator.java index c58a42fe010..58e9485f8db 100644 --- a/src/main/java/ch/njol/skript/doc/HTMLGenerator.java +++ b/src/main/java/ch/njol/skript/doc/HTMLGenerator.java @@ -373,22 +373,6 @@ else if (!filesInside.getName().matches("(?i)(.*)\\.(html?|js|css|json)")) { page = page.replace(page.substring(generate, nextBracket + 1), generated.toString()); - // skwipt - String ogTitle = "Skript Documentation"; - 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."; - 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."; - 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."; - Pattern exampleCode = Pattern.compile("command /sethome:.*?You have been teleported."); - Pattern skriptPattern = Pattern.compile("(?<=[a-zA-Z0-9]|^|>)([Ss]kript)"); - page = page.replace(ogTitle, introduceSkwipt(ogTitle)); - page = page.replace(ogDesc, introduceSkwipt(ogDesc)); - page = page.replace(homepageDesc, introduceSkwipt(homepageDesc)); - page = page.replace(homepageDesc2, introduceSkwipt(homepageDesc2)); - Matcher exampleMatcher = exampleCode.matcher(page); - Matcher skriptMatcher = skriptPattern.matcher(page); - page = exampleMatcher.replaceAll(introduceSkwipt(exampleMatcher.group(0))); - page = skriptMatcher.replaceAll(introduceSkwipt(skriptMatcher.group(1))); - generate = page.indexOf("${generate", nextBracket); } @@ -398,6 +382,23 @@ else if (!filesInside.getName().matches("(?i)(.*)\\.(html?|js|css|json)")) { assert page != null; page = minifyHtml(page); } + + // skwipt + String ogTitle = "Skript Documentation"; + 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."; + 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."; + 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."; + Pattern exampleCode = Pattern.compile("command /sethome:.*?You have been teleported."); + Pattern skriptPattern = Pattern.compile("(?<=[a-zA-Z0-9]|^|>)([Ss]kript)"); + page = page.replace(ogTitle, introduceSkwipt(ogTitle)); + page = page.replace(ogDesc, introduceSkwipt(ogDesc)); + page = page.replace(homepageDesc, introduceSkwipt(homepageDesc)); + page = page.replace(homepageDesc2, introduceSkwipt(homepageDesc2)); + Matcher exampleMatcher = exampleCode.matcher(page); + page = exampleMatcher.replaceAll(introduceSkwipt(exampleMatcher.group(0))); + Matcher skriptMatcher = skriptPattern.matcher(page); + page = skriptMatcher.replaceAll(introduceSkwipt(skriptMatcher.group(1))); + assert page != null; writeFile(new File(output + File.separator + name), page); }