From a810b3b1ea423c73831c83d0cafe38c790c39d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 23 Feb 2022 19:47:22 +0100 Subject: [PATCH] language_injection.md: use MD notation for images --- .../language_injection.md | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) 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.