Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
isHarryh committed Feb 18, 2025
1 parent 32a70f6 commit 3970973
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion desktop/src/cn/harryh/arkpets/utils/FXMLHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private FXMLHelper() {
* @return A record containing the controller and the FXML object hierarchy.
* @throws IOException If an I/O exception occurs during loading.
*/
public static <T extends Application> LoadFXMLResult<T> loadFXML( URL location)
public static <T extends Application> LoadFXMLResult<T> loadFXML(URL location)
throws IOException {
FXMLLoader fxml = new FXMLLoader(location);
Node content = Objects.requireNonNull(fxml.load());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private void renderHtml(String literal) {
if (Pattern.matches("^ *<br */?> *$", literal)) {
// <br> -> line break
textFlow.closeTextFlow();
} else if(Pattern.matches(" *<hr */?> *$", literal)) {
} else if (Pattern.matches(" *<hr */?> *$", literal)) {
// <hr> -> separator
writer.tag("Separator", Map.of(), true);
writer.line();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
package cn.harryh.arkpets.utils.markdown;

import cn.harryh.arkpets.utils.IOUtils;
import javafx.fxml.FXMLLoader;
import org.commonmark.ext.autolink.AutolinkExtension;
import org.commonmark.ext.gfm.strikethrough.StrikethroughExtension;
Expand All @@ -13,7 +12,6 @@
import org.commonmark.renderer.html.HtmlRenderer;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.List;

Expand Down Expand Up @@ -46,8 +44,6 @@ public static String toFxmlString(String markdown) {
public static FxmlDocumentController toFxmlController(String markdown) {
String fxml = toFxmlString(markdown);
try {
// TODO Debug only
IOUtils.FileUtil.writeString(new File("temp.fxml"), "UTF-8", fxml, false);
FxmlDocumentController controller = new FxmlDocumentController();
FXMLLoader loader = new FXMLLoader();
loader.setClassLoader(FxmlConvertor.class.getClassLoader());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class TextFlowCoordinator {
private final HtmlWriter writer;
private TextFlowStatus status;

public TextFlowCoordinator(HtmlWriter writer) {
this.writer = writer;
this.status = TextFlowStatus.CLOSED;
Expand Down

0 comments on commit 3970973

Please sign in to comment.