Skip to content

Commit

Permalink
Merge pull request #206 from ZenUml/fix-conflict-with-markdown
Browse files Browse the repository at this point in the history
Resolved the conflict with markdown plugin.
  • Loading branch information
MrCoder authored Sep 21, 2022
2 parents 36491ad + 013f361 commit dcbe33f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.*;
import org.intellij.plugins.markdown.settings.MarkdownCssSettings;
import org.intellij.plugins.markdown.ui.preview.javafx.MarkdownJavaFxHtmlPanel;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand All @@ -29,7 +30,7 @@
public class PreviewStaticServer2 extends HttpRequestHandler {
public static final String INLINE_CSS_FILENAME = "inline.css";
private static final Logger LOG = Logger.getInstance(PreviewStaticServer2.class);
private static final String PREFIX = "/api/markdown-preview/";
private static final String PREFIX = "/api/zenuml-preview/";

@Nullable
private byte[] myInlineStyleBytes = null;
Expand Down Expand Up @@ -88,19 +89,19 @@ public boolean process(@NotNull QueryStringDecoder urlDecoder,
final String contentType = typeAndName.get(0);
final String fileName = typeAndName.get(1);

if ("js".equals(contentType) && MarkdownHtmlPanel.SCRIPTS.contains(fileName)) {
if ("js".equals(contentType)) {
sendResource(request,
context.channel(),
MarkdownJavaFxHtmlPanel.class,
fileName);
} else if (("css".equals(contentType) || "styles".equals(contentType)) && MarkdownHtmlPanel.STYLES.contains(fileName)) {
} else if (("css".equals(contentType) || "styles".equals(contentType))) {

if (INLINE_CSS_FILENAME.equals(fileName)) {
sendInlineStyle(request, context.channel());
} else {
sendResource(request,
context.channel(),
MarkdownJavaFxHtmlPanel.class,
MarkdownCssSettings.class,
fileName);
}
} else {
Expand Down

0 comments on commit dcbe33f

Please sign in to comment.