• R/O
  • SSH
  • HTTPS

blogs: コミット


コミットメタ情報

リビジョン107 (tree)
日時2020-05-22 12:00:47
作者hirukawa_ryo

ログメッセージ

* flexmark-ext-highlight 0.3
flexmark 0.61.32 に追従しました。
flexmarkの仕様ころころと変わり過ぎです!

変更サマリ

差分

--- flexmark-ext-highlight/trunk/src/main/java/net/osdn/blogs/flexmark/ext/highlight/HighlightExtension.java (revision 106)
+++ flexmark-ext-highlight/trunk/src/main/java/net/osdn/blogs/flexmark/ext/highlight/HighlightExtension.java (revision 107)
@@ -4,10 +4,10 @@
44 import com.vladsch.flexmark.html.HtmlRenderer.Builder;
55 import com.vladsch.flexmark.html.renderer.NodeRenderer;
66 import com.vladsch.flexmark.html.renderer.NodeRendererFactory;
7-import com.vladsch.flexmark.util.builder.Extension;
87 import com.vladsch.flexmark.util.data.DataHolder;
98 import com.vladsch.flexmark.util.data.DataKey;
109 import com.vladsch.flexmark.util.data.MutableDataHolder;
10+import com.vladsch.flexmark.util.misc.Extension;
1111
1212 public class HighlightExtension implements HtmlRenderer.HtmlRendererExtension {
1313 public static final DataKey<Boolean> REPLACE_YEN_SIGN = new DataKey<>("REPLACE_YEN_SIGN", true);
--- flexmark-ext-highlight/trunk/src/main/java/net/osdn/blogs/flexmark/ext/highlight/HighlightRenderer.java (revision 106)
+++ flexmark-ext-highlight/trunk/src/main/java/net/osdn/blogs/flexmark/ext/highlight/HighlightRenderer.java (revision 107)
@@ -11,7 +11,6 @@
1111 import com.codewaves.codehighlight.core.StyleRendererFactory;
1212 import com.codewaves.codehighlight.renderer.HtmlRenderer;
1313 import com.vladsch.flexmark.ast.FencedCodeBlock;
14-import com.vladsch.flexmark.html.CustomNodeRenderer;
1514 import com.vladsch.flexmark.html.HtmlWriter;
1615 import com.vladsch.flexmark.html.renderer.AttributablePart;
1716 import com.vladsch.flexmark.html.renderer.NodeRenderer;
@@ -19,6 +18,7 @@
1918 import com.vladsch.flexmark.html.renderer.NodeRenderingHandler;
2019 import com.vladsch.flexmark.parser.Parser;
2120 import com.vladsch.flexmark.util.data.DataHolder;
21+import com.vladsch.flexmark.util.misc.CharPredicate;
2222 import com.vladsch.flexmark.util.sequence.BasedSequence;
2323
2424 public class HighlightRenderer implements NodeRenderer {
@@ -51,14 +51,14 @@
5151 });
5252
5353 public HighlightRenderer(DataHolder options) {
54- codeContentBlock = Parser.FENCED_CODE_CONTENT_BLOCK.getFrom(options);
55- isReplaceYenSign = HighlightExtension.REPLACE_YEN_SIGN.getFrom(options);
54+ codeContentBlock = Parser.FENCED_CODE_CONTENT_BLOCK.get(options);
55+ isReplaceYenSign = HighlightExtension.REPLACE_YEN_SIGN.get(options);
5656 }
5757
5858 @Override
5959 public Set<NodeRenderingHandler<?>> getNodeRenderingHandlers() {
6060 Set<NodeRenderingHandler<?>> set = new HashSet<NodeRenderingHandler<?>>();
61- set.add(new NodeRenderingHandler<FencedCodeBlock>(FencedCodeBlock.class, new CustomNodeRenderer<FencedCodeBlock>() {
61+ set.add(new NodeRenderingHandler<FencedCodeBlock>(FencedCodeBlock.class, new NodeRenderingHandler.CustomNodeRenderer<FencedCodeBlock>() {
6262 @Override
6363 public void render(FencedCodeBlock node, NodeRendererContext context, HtmlWriter html) {
6464 HighlightRenderer.this.render(node, context, html);
@@ -118,7 +118,7 @@
118118 }
119119
120120 if (info.isNotNull() && !info.isBlank()) {
121- int space = info.indexOfAny(" ");
121+ int space = info.indexOfAny(CharPredicate.SPACE);
122122 if (space == -1) {
123123 language = info;
124124 } else {
旧リポジトリブラウザで表示