Skip to content

Commit

Permalink
fast coding == bad
Browse files Browse the repository at this point in the history
  • Loading branch information
AyhamAl-Ali committed Apr 1, 2024
1 parent 5555f88 commit 2ff6453
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/ch/njol/skript/doc/HTMLGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ 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.";
Expand All @@ -395,9 +395,11 @@ else if (!filesInside.getName().matches("(?i)(.*)\\.(html?|js|css|json)")) {
page = page.replace(homepageDesc, introduceSkwipt(homepageDesc));
page = page.replace(homepageDesc2, introduceSkwipt(homepageDesc2));
Matcher exampleMatcher = exampleCode.matcher(page);
page = exampleMatcher.replaceAll(introduceSkwipt(exampleMatcher.group(0)));
if (exampleMatcher.find())
page = exampleMatcher.replaceAll(introduceSkwipt(exampleMatcher.group(0)));
Matcher skriptMatcher = skriptPattern.matcher(page);
page = skriptMatcher.replaceAll(introduceSkwipt(skriptMatcher.group(1)));
if (skriptMatcher.find())
page = skriptMatcher.replaceAll(introduceSkwipt(skriptMatcher.group(1)));

assert page != null;
writeFile(new File(output + File.separator + name), page);
Expand Down

0 comments on commit 2ff6453

Please sign in to comment.