diff --git a/topics/reference_guide/custom_language_support/language_injection.md b/topics/reference_guide/custom_language_support/language_injection.md index e5714c0b7..573a54f26 100644 --- a/topics/reference_guide/custom_language_support/language_injection.md +++ b/topics/reference_guide/custom_language_support/language_injection.md @@ -11,15 +11,21 @@ Language injection is the way the IntelliJ Platform handles different languages Injected code is always bound to a specific context that depends on the surrounding code, and the IntelliJ Platform treats injected fragments as separate small files that are in a different language. To ensure highlighting and code-insight features work correctly, these fragments must be a valid statement or expression in the injected language. The three examples from above would then be shown like this in IntelliJ IDEs: - - Regex Language Injection - - - SQL Language Injection - - - Markdown Language Injection - + + +![Regex Language Injection](regex_language_injection.png){border-effect="line"} + + + + +![SQL Language Injection](sql_language_injection.png){border-effect="line"} + + + + +![Markdown Language Injection](markdown_code_language_injection.png){border-effect="line"} + + It’s not unusual that injected fragments are distributed among, e.g., several strings that are concatenated like it is common for SQL queries. To solve this, the IntelliJ Platform allows injecting a language into several fragments at once. Multiple parts are then considered belonging together.