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.incrementBlockQuoteIndent();
|
||||
visitor.incrementBlockIndent();
|
||||
visitor.visitChildren(taskListBlock);
|
||||
visitor.decrementBlockQuoteIndent();
|
||||
visitor.decrementBlockIndent();
|
||||
|
||||
if (visitor.hasNext(taskListBlock)) {
|
||||
visitor.ensureNewLine();
|
||||
@ -86,20 +86,20 @@ public class TaskListPlugin extends AbstractMarkwonPlugin {
|
||||
|
||||
final int length = visitor.length();
|
||||
|
||||
final int indent = visitor.blockQuoteIndent();
|
||||
visitor.blockQuoteIntent(indent + taskListItem.indent());
|
||||
final int indent = visitor.blockIndent();
|
||||
visitor.blockIntent(indent + taskListItem.indent());
|
||||
visitor.visitChildren(taskListItem);
|
||||
visitor.setSpans(length, new TaskListSpan(
|
||||
visitor.theme(),
|
||||
drawable,
|
||||
visitor.blockQuoteIndent(),
|
||||
visitor.blockIndent(),
|
||||
taskListItem.done()));
|
||||
|
||||
if (visitor.hasNext(taskListItem)) {
|
||||
visitor.ensureNewLine();
|
||||
}
|
||||
|
||||
visitor.blockQuoteIntent(indent);
|
||||
visitor.blockIntent(indent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -39,13 +39,13 @@ public interface MarkwonVisitor extends Visitor {
|
||||
|
||||
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();
|
||||
|
||||
|
@ -217,22 +217,22 @@ class MarkwonVisitorImpl implements MarkwonVisitor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementBlockQuoteIndent() {
|
||||
public void incrementBlockIndent() {
|
||||
blockQuoteIndent += 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementBlockQuoteIndent() {
|
||||
public void decrementBlockIndent() {
|
||||
blockQuoteIndent -= 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void blockQuoteIntent(int blockQuoteIndent) {
|
||||
this.blockQuoteIndent = blockQuoteIndent;
|
||||
public void blockIntent(int blockIndent) {
|
||||
this.blockQuoteIndent = blockIndent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int blockQuoteIndent() {
|
||||
public int blockIndent() {
|
||||
return blockQuoteIndent;
|
||||
}
|
||||
|
||||
|
@ -126,10 +126,10 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
||||
visitor.ensureNewLine();
|
||||
|
||||
final int length = visitor.length();
|
||||
visitor.incrementBlockQuoteIndent();
|
||||
visitor.incrementBlockIndent();
|
||||
visitor.visitChildren(blockQuote);
|
||||
visitor.setSpans(length, visitor.factory().blockQuote(visitor.theme()));
|
||||
visitor.decrementBlockQuoteIndent();
|
||||
visitor.decrementBlockIndent();
|
||||
|
||||
if (visitor.hasNext(blockQuote)) {
|
||||
visitor.ensureNewLine();
|
||||
@ -229,7 +229,7 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
||||
if (visitor.hasNext(node)) {
|
||||
visitor.ensureNewLine();
|
||||
if (visitor.listLevel() == 0
|
||||
&& visitor.blockQuoteIndent() == 0) {
|
||||
&& visitor.blockIndent() == 0) {
|
||||
visitor.forceNewLine();
|
||||
}
|
||||
}
|
||||
@ -242,7 +242,7 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
||||
|
||||
final int length = visitor.length();
|
||||
|
||||
visitor.incrementBlockQuoteIndent();
|
||||
visitor.incrementBlockIndent();
|
||||
visitor.incrementListLevel();
|
||||
|
||||
final Node parent = listItem.getParent();
|
||||
@ -265,7 +265,7 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
||||
|
||||
}
|
||||
|
||||
visitor.decrementBlockQuoteIndent();
|
||||
visitor.decrementBlockIndent();
|
||||
visitor.decrementListLevel();
|
||||
|
||||
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