[javadoc] IDEA-285556 Support language injection into snippet

Usually leading asterisks of a javadoc are aligned so the common indent for the lines in a snippet's body is obvious,
but nevertheless javadoc can have multiple leading asterisks, and they don't have to be aligned.
This patch fixes the indent stripping: if the indent is too short, which will result in leaving some leading
asterisks after stripping the indent from the line, the indent gets increased, so it goes after the last leading asterisk in the line.

GitOrigin-RevId: c79bcb3e25b96b5b1ff52da350f926673d155199
This commit is contained in:
Nikita Eshkeev
2022-02-10 04:12:07 +03:00
committed by intellij-monorepo-bot
parent 50e17a9f98
commit fd0a6dfb94
18 changed files with 238 additions and 40 deletions

View File

@@ -0,0 +1,15 @@
class A {
/**
* A simple program.
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
* class HelloWorld {
* void
* f(
* ) {
}
* }
* }
*/
void g() { }
}