Skip to content

Commit eb5eeca

Browse files
committed
Add Extensions.FENCED_CODE_BLOCKS
1 parent b69b4ca commit eb5eeca

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/com/junichi11/netbeans/modules/github/issues/issue/ui/CommentTabbedPanel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
package com.junichi11.netbeans.modules.github.issues.issue.ui;
4343

4444
import java.awt.Component;
45+
import org.pegdown.Extensions;
4546
import org.pegdown.PegDownProcessor;
4647

4748
/**
@@ -143,7 +144,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
143144
private void commentTabbedPaneStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_commentTabbedPaneStateChanged
144145
Component selectedComponent = commentTabbedPane.getSelectedComponent();
145146
if (selectedComponent == commentPreviewPanel) {
146-
String html = new PegDownProcessor().markdownToHtml(commentWriteTextArea.getText());
147+
String html = new PegDownProcessor(Extensions.FENCED_CODE_BLOCKS).markdownToHtml(commentWriteTextArea.getText());
147148
commentPreviewEditorPane.setText(html);
148149
}
149150
}//GEN-LAST:event_commentTabbedPaneStateChanged

src/main/java/com/junichi11/netbeans/modules/github/issues/issue/ui/GitHubIssuePanel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
import org.openide.util.ImageUtilities;
8080
import org.openide.util.NbBundle;
8181
import org.openide.util.RequestProcessor;
82+
import org.pegdown.Extensions;
8283
import org.pegdown.PegDownProcessor;
8384

8485
/**
@@ -238,7 +239,7 @@ public void update() {
238239
// add comments
239240
commentsPanel.removeAllComments();
240241
List<Comment> comments = gitHubIssue.getComments();
241-
PegDownProcessor processor = new PegDownProcessor();
242+
PegDownProcessor processor = new PegDownProcessor(Extensions.FENCED_CODE_BLOCKS);
242243
for (Comment comment : comments) {
243244
String body = comment.getBody();
244245
String bodyHtml = processor.markdownToHtml(body);

0 commit comments

Comments
 (0)