aboutsummaryrefslogtreecommitdiff
path: root/kotlinpoet
diff options
context:
space:
mode:
authorGoooler <wangzongler@gmail.com>2021-09-04 19:44:57 +0800
committerGitHub <noreply@github.com>2021-09-04 07:44:57 -0400
commit8b7a651d4373ac2b3aa5d39553dbbfd0e6c66f57 (patch)
tree9af1481e75e2d3bb6260b7a9ff6bb2ffec8c254b /kotlinpoet
parenta9755a467d3255d00af8d323970cf106518da819 (diff)
downloadkotlinpoet-8b7a651d4373ac2b3aa5d39553dbbfd0e6c66f57.tar.gz
Specify languages in kdoc code fragments (#1141)
Diffstat (limited to 'kotlinpoet')
-rw-r--r--kotlinpoet/src/main/java/com/squareup/kotlinpoet/NameAllocator.kt6
-rw-r--r--kotlinpoet/src/test/java/com/squareup/kotlinpoet/TypesEclipseTest.kt2
2 files changed, 4 insertions, 4 deletions
diff --git a/kotlinpoet/src/main/java/com/squareup/kotlinpoet/NameAllocator.kt b/kotlinpoet/src/main/java/com/squareup/kotlinpoet/NameAllocator.kt
index 30bd328f..8c39cab5 100644
--- a/kotlinpoet/src/main/java/com/squareup/kotlinpoet/NameAllocator.kt
+++ b/kotlinpoet/src/main/java/com/squareup/kotlinpoet/NameAllocator.kt
@@ -22,7 +22,7 @@ import java.util.UUID
* first create an instance and allocate all of the names that you need. Typically this is a
* mix of user-supplied names and constants:
*
- * ```
+ * ```kotlin
* val nameAllocator = NameAllocator()
* for (property in properties) {
* nameAllocator.newName(property.name, property)
@@ -37,7 +37,7 @@ import java.util.UUID
*
* Once we've allocated names we can use them when generating code:
*
- * ```
+ * ```kotlin
* val builder = FunSpec.builder("toString")
* .addModifiers(KModifier.OVERRIDE)
* .returns(String::class)
@@ -56,7 +56,7 @@ import java.util.UUID
* The above code generates unique names if presented with conflicts. Given user-supplied properties
* with names `ab` and `sb` this generates the following:
*
- * ```
+ * ```kotlin
* override fun toString(): kotlin.String {
* val sb_ = java.lang.StringBuilder()
* sb_.append(ab)
diff --git a/kotlinpoet/src/test/java/com/squareup/kotlinpoet/TypesEclipseTest.kt b/kotlinpoet/src/test/java/com/squareup/kotlinpoet/TypesEclipseTest.kt
index d8e13961..a3ae52b5 100644
--- a/kotlinpoet/src/test/java/com/squareup/kotlinpoet/TypesEclipseTest.kt
+++ b/kotlinpoet/src/test/java/com/squareup/kotlinpoet/TypesEclipseTest.kt
@@ -45,7 +45,7 @@ class TypesEclipseTest : AbstractTypesTest() {
*
* To use this rule in a test, just add the following field:
*
- * ```
+ * ```java
* public CompilationRule compilationRule = new CompilationRule();
* ```
*