Skip to content

Commit

Permalink
Document Processor: Fixed IndexOutOfBounds for doc paths without deli…
Browse files Browse the repository at this point in the history
…miter
  • Loading branch information
kindlich committed Apr 17, 2020
1 parent 732f5fc commit c8525a7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -153,7 +153,7 @@ private void writeYAML() throws IOException {
final Map<String, YAMLFolder> files = new HashMap<>();
for(CrafttweakerDocumentationPage value : values) {

String path = value.getDocPath().substring(0, value.getDocPath().lastIndexOf("/"));
String path = value.getDocPath().contains("/") ? value.getDocPath().substring(0, value.getDocPath().lastIndexOf("/")) : value.getDocPath();
String[] topFolders = path.split("/");
for(int i = 0; i < topFolders.length; i++) {
topFolders[i] = topFolders[i].toUpperCase().charAt(0) + topFolders[i].substring(1);
Expand Down

0 comments on commit c8525a7

Please sign in to comment.