[CMI] Rename CodeMetaInfo.platforms to attributes
This commit is contained in:
@@ -161,13 +161,13 @@ class CodeMetaInfoTestCase(
|
||||
val correspondingParsed = parsedMetaInfo.firstOrNull { it == codeMetaInfo }
|
||||
if (correspondingParsed != null) {
|
||||
parsedMetaInfo.remove(correspondingParsed)
|
||||
codeMetaInfo.platforms.addAll(correspondingParsed.platforms)
|
||||
if (correspondingParsed.platforms.isNotEmpty() && OSKind.current.toString() !in correspondingParsed.platforms)
|
||||
codeMetaInfo.platforms.add(OSKind.current.toString())
|
||||
codeMetaInfo.attributes.addAll(correspondingParsed.attributes)
|
||||
if (correspondingParsed.attributes.isNotEmpty() && OSKind.current.toString() !in correspondingParsed.attributes)
|
||||
codeMetaInfo.attributes.add(OSKind.current.toString())
|
||||
}
|
||||
}
|
||||
parsedMetaInfo.forEach {
|
||||
if (it.platforms.isNotEmpty() && OSKind.current.toString() !in it.platforms) codeMetaInfoForCheck.add(
|
||||
if (it.attributes.isNotEmpty() && OSKind.current.toString() !in it.attributes) codeMetaInfoForCheck.add(
|
||||
it
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ class HighlightingCodeMetaInfo(
|
||||
override val tag: String
|
||||
get() = renderConfiguration.getTag()
|
||||
|
||||
override val platforms: MutableList<String> = mutableListOf()
|
||||
override val attributes: MutableList<String> = mutableListOf()
|
||||
|
||||
override fun asString(): String = renderConfiguration.asString(this)
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class LineMarkerCodeMetaInfo(
|
||||
override val tag: String
|
||||
get() = renderConfiguration.getTag()
|
||||
|
||||
override val platforms: MutableList<String> = mutableListOf()
|
||||
override val attributes: MutableList<String> = mutableListOf()
|
||||
|
||||
override fun asString(): String = renderConfiguration.asString(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user