Rename blockQuoteIndent to blockIndent
This commit is contained in:
parent
b52de58fbd
commit
42aab2280e
@ -70,9 +70,9 @@ public class TaskListPlugin extends AbstractMarkwonPlugin {
|
|||||||
|
|
||||||
visitor.ensureNewLine();
|
visitor.ensureNewLine();
|
||||||
|
|
||||||
visitor.incrementBlockQuoteIndent();
|
visitor.incrementBlockIndent();
|
||||||
visitor.visitChildren(taskListBlock);
|
visitor.visitChildren(taskListBlock);
|
||||||
visitor.decrementBlockQuoteIndent();
|
visitor.decrementBlockIndent();
|
||||||
|
|
||||||
if (visitor.hasNext(taskListBlock)) {
|
if (visitor.hasNext(taskListBlock)) {
|
||||||
visitor.ensureNewLine();
|
visitor.ensureNewLine();
|
||||||
@ -86,20 +86,20 @@ public class TaskListPlugin extends AbstractMarkwonPlugin {
|
|||||||
|
|
||||||
final int length = visitor.length();
|
final int length = visitor.length();
|
||||||
|
|
||||||
final int indent = visitor.blockQuoteIndent();
|
final int indent = visitor.blockIndent();
|
||||||
visitor.blockQuoteIntent(indent + taskListItem.indent());
|
visitor.blockIntent(indent + taskListItem.indent());
|
||||||
visitor.visitChildren(taskListItem);
|
visitor.visitChildren(taskListItem);
|
||||||
visitor.setSpans(length, new TaskListSpan(
|
visitor.setSpans(length, new TaskListSpan(
|
||||||
visitor.theme(),
|
visitor.theme(),
|
||||||
drawable,
|
drawable,
|
||||||
visitor.blockQuoteIndent(),
|
visitor.blockIndent(),
|
||||||
taskListItem.done()));
|
taskListItem.done()));
|
||||||
|
|
||||||
if (visitor.hasNext(taskListItem)) {
|
if (visitor.hasNext(taskListItem)) {
|
||||||
visitor.ensureNewLine();
|
visitor.ensureNewLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
visitor.blockQuoteIntent(indent);
|
visitor.blockIntent(indent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -39,13 +39,13 @@ public interface MarkwonVisitor extends Visitor {
|
|||||||
|
|
||||||
boolean hasNext(@NonNull Node node);
|
boolean hasNext(@NonNull Node node);
|
||||||
|
|
||||||
void incrementBlockQuoteIndent();
|
void incrementBlockIndent();
|
||||||
|
|
||||||
void decrementBlockQuoteIndent();
|
void decrementBlockIndent();
|
||||||
|
|
||||||
void blockQuoteIntent(int blockQuoteIndent);
|
void blockIntent(int blockIndent);
|
||||||
|
|
||||||
int blockQuoteIndent();
|
int blockIndent();
|
||||||
|
|
||||||
void incrementListLevel();
|
void incrementListLevel();
|
||||||
|
|
||||||
|
@ -217,22 +217,22 @@ class MarkwonVisitorImpl implements MarkwonVisitor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void incrementBlockQuoteIndent() {
|
public void incrementBlockIndent() {
|
||||||
blockQuoteIndent += 1;
|
blockQuoteIndent += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decrementBlockQuoteIndent() {
|
public void decrementBlockIndent() {
|
||||||
blockQuoteIndent -= 1;
|
blockQuoteIndent -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void blockQuoteIntent(int blockQuoteIndent) {
|
public void blockIntent(int blockIndent) {
|
||||||
this.blockQuoteIndent = blockQuoteIndent;
|
this.blockQuoteIndent = blockIndent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int blockQuoteIndent() {
|
public int blockIndent() {
|
||||||
return blockQuoteIndent;
|
return blockQuoteIndent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,10 +126,10 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
|||||||
visitor.ensureNewLine();
|
visitor.ensureNewLine();
|
||||||
|
|
||||||
final int length = visitor.length();
|
final int length = visitor.length();
|
||||||
visitor.incrementBlockQuoteIndent();
|
visitor.incrementBlockIndent();
|
||||||
visitor.visitChildren(blockQuote);
|
visitor.visitChildren(blockQuote);
|
||||||
visitor.setSpans(length, visitor.factory().blockQuote(visitor.theme()));
|
visitor.setSpans(length, visitor.factory().blockQuote(visitor.theme()));
|
||||||
visitor.decrementBlockQuoteIndent();
|
visitor.decrementBlockIndent();
|
||||||
|
|
||||||
if (visitor.hasNext(blockQuote)) {
|
if (visitor.hasNext(blockQuote)) {
|
||||||
visitor.ensureNewLine();
|
visitor.ensureNewLine();
|
||||||
@ -229,7 +229,7 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
|||||||
if (visitor.hasNext(node)) {
|
if (visitor.hasNext(node)) {
|
||||||
visitor.ensureNewLine();
|
visitor.ensureNewLine();
|
||||||
if (visitor.listLevel() == 0
|
if (visitor.listLevel() == 0
|
||||||
&& visitor.blockQuoteIndent() == 0) {
|
&& visitor.blockIndent() == 0) {
|
||||||
visitor.forceNewLine();
|
visitor.forceNewLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
|||||||
|
|
||||||
final int length = visitor.length();
|
final int length = visitor.length();
|
||||||
|
|
||||||
visitor.incrementBlockQuoteIndent();
|
visitor.incrementBlockIndent();
|
||||||
visitor.incrementListLevel();
|
visitor.incrementListLevel();
|
||||||
|
|
||||||
final Node parent = listItem.getParent();
|
final Node parent = listItem.getParent();
|
||||||
@ -265,7 +265,7 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
visitor.decrementBlockQuoteIndent();
|
visitor.decrementBlockIndent();
|
||||||
visitor.decrementListLevel();
|
visitor.decrementListLevel();
|
||||||
|
|
||||||
if (visitor.hasNext(listItem)) {
|
if (visitor.hasNext(listItem)) {
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
package ru.noties.markwon.core.visitor;
|
||||||
|
|
||||||
|
public class BlockQuoteNodeVisitor {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package ru.noties.markwon.core.visitor;
|
||||||
|
|
||||||
|
public class EmphasisNodeVisitor {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package ru.noties.markwon.core.visitor;
|
||||||
|
|
||||||
|
public class StrongEmphasisNodeVisitor {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package ru.noties.markwon.core.visitor;
|
||||||
|
|
||||||
|
public class TextNodeVisitor {
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user