-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
.pagecounter
, use standalone .currentpage
and .totalpages
- Loading branch information
Showing
6 changed files
with
62 additions
and
73 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
core/src/main/kotlin/eu/iamgio/quarkdown/ast/quarkdown/inline/PageCounter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package eu.iamgio.quarkdown.ast.quarkdown.inline | ||
|
||
import eu.iamgio.quarkdown.ast.Node | ||
import eu.iamgio.quarkdown.visitor.node.NodeVisitor | ||
|
||
/** | ||
* A counter for the current or total page number. | ||
* In case the current document type does not support page counting (e.g. plain document), | ||
* a placeholder is used at rendering time. | ||
* @param target whether the counter should display the current or total page number | ||
*/ | ||
data class PageCounter(val target: Target) : Node { | ||
enum class Target { | ||
/** | ||
* The current page number. | ||
*/ | ||
CURRENT, | ||
|
||
/** | ||
* The total amount of pages. | ||
*/ | ||
TOTAL, | ||
} | ||
|
||
override fun <T> accept(visitor: NodeVisitor<T>): T = visitor.visit(this) | ||
} |
20 changes: 0 additions & 20 deletions
20
core/src/main/kotlin/eu/iamgio/quarkdown/ast/quarkdown/invisible/PageCounterInitializer.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters