Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
some final comments which i forgot
Browse files Browse the repository at this point in the history
  • Loading branch information
homchom committed Dec 14, 2023
1 parent ef2001e commit bb0d338
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import net.minecraft.world.item.ItemStack

data class HighlightedExpression(val text: FormattedCharSequence, val preview: FormattedCharSequence?)

/**
* An object that highlights and caches DF value and MiniMessage expressions.
*
* @see runHighlighting
*/
class ExpressionHighlighter {
private val codes = setOf(
"default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package io.github.homchom.recode.ui.text

import net.minecraft.util.FormattedCharSequence

/**
* @see CharSequence.replaceRange
*/
fun FormattedCharSequence.replaceRange(
range: IntRange,
replacement: FormattedCharSequence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object MiniMessageHighlighter {
* `<obfuscated>` is **not** supported.
* - All other valid tags are treated as "literals" and colored gray.
*/
@Suppress("UnstableApiUsage") // TODO: open issue
@Suppress("UnstableApiUsage") // TODO: open issue at adventure github
fun highlight(input: String): Component {
// handle the special case of inputs with <reset> parser directives
// TODO: determine if there is a better way to do this
Expand Down

0 comments on commit bb0d338

Please sign in to comment.