Browse Source

Fix regex for number values (#2962)

pull/2968/head
Ivan Matkov 2 years ago committed by GitHub
parent
commit
b3ccc1526f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorView.kt

2
examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/EditorView.kt

@ -169,7 +169,7 @@ private fun codeString(str: String) = buildAnnotatedString {
addStyle(AppTheme.code.keyword, strFormatted, "package ") addStyle(AppTheme.code.keyword, strFormatted, "package ")
addStyle(AppTheme.code.value, strFormatted, "true") addStyle(AppTheme.code.value, strFormatted, "true")
addStyle(AppTheme.code.value, strFormatted, "false") addStyle(AppTheme.code.value, strFormatted, "false")
addStyle(AppTheme.code.value, strFormatted, Regex("[0-9]*")) addStyle(AppTheme.code.value, strFormatted, Regex("[0-9]+"))
addStyle(AppTheme.code.annotation, strFormatted, Regex("^@[a-zA-Z_]*")) addStyle(AppTheme.code.annotation, strFormatted, Regex("^@[a-zA-Z_]*"))
addStyle(AppTheme.code.comment, strFormatted, Regex("^\\s*//.*")) addStyle(AppTheme.code.comment, strFormatted, Regex("^\\s*//.*"))
} }

Loading…
Cancel
Save