Skip to content

Commit

Permalink
Add type annotations, rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
valentjn committed Aug 5, 2021
1 parent 81309f9 commit 2a40f92
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,12 @@ class LatexAnnotatedTextBuilder(codeLanguageId: String) : CodeAnnotatedTextBuild
var match = ""
var matchingCommandSignature: LatexCommandSignature? = null

for (latexCommandSignature in possibleCommandSignatures) {
val curMatch: String = latexCommandSignature.matchFromPosition(this.code, this.pos)
for (commandSignature: LatexCommandSignature in possibleCommandSignatures) {
val curMatch: String = commandSignature.matchFromPosition(this.code, this.pos)

if (curMatch.isNotEmpty() && (curMatch.length >= match.length)) {
match = curMatch
matchingCommandSignature = latexCommandSignature
matchingCommandSignature = commandSignature
}
}

Expand Down Expand Up @@ -981,7 +981,7 @@ class LatexAnnotatedTextBuilder(codeLanguageId: String) : CodeAnnotatedTextBuild
): Map<String, List<T>> {
val map = HashMap<String, ArrayList<T>>()

for (commandSignature in commandSignatures) {
for (commandSignature: T in commandSignatures) {
val commandPrefix: String = commandSignature.prefix
val list: MutableList<T> = map[commandPrefix] ?: run {
val list = ArrayList<T>()
Expand Down

0 comments on commit 2a40f92

Please sign in to comment.