Skip to content

Conversation

@Levi-Lesches
Copy link

The codeblock.json file here is supposed to catch a code block that starts with kotlin, but it actually works when the word kotlin appears anywhere in the code block, which is... really unfortunate when writing Android docs!

This fix makes it so that it only applies when the code block starts with kotlin.

To test:

  • put the cursor anywhere in the hello = 1 text
  • open the command palette (ctrl+shift+P)
  • choose Developer Inspect Editor and Token Scopes
  • check the language field in the pop-up

This should highlight as Kotlin:

```kotlin
hello = 1
```

While this should not:

```groovy 
android {
  kotlinOptions {
    hello = 1
  }
}
```

Fixes #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specific kotlin codeblock breaks markdown document

1 participant