From 83ddf40386e64a3cbcd3eef40aaf32eda6829217 Mon Sep 17 00:00:00 2001 From: Joshua Brown Date: Wed, 8 Nov 2023 18:58:12 -0800 Subject: [PATCH] S (#130) --- .../java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java b/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java index 7b72f5c..81c76e5 100644 --- a/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java +++ b/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java @@ -23,7 +23,12 @@ public LaTexCommand() { @Override public void runCommandThread(CommandContext ctx) { - String latex = ctx.parsedMsg().substring(ctx.parsedMsg().indexOf(' ') + 1); + String latex; + if(ctx.parsedMsg().contains(" ")) { + latex = ctx.parsedMsg().substring(ctx.parsedMsg().indexOf(' ') + 1); + } else { + latex = "\\LaTeX"; + } TeXFormula formula; // Catch any error in the user input and return that to the user