void () { testParsing( """ public class X { // @start region=test void main() { System.out.println("Hello"); // @replace substring=Hello replacement=... // @highlight substring=Hello : System.out.println("Hello"); // @highlight region: System.out.println("Hello1"); System.out.println("Hello2"); // @link regex=H\\w+ target=Hello type=linkplain // @end } // @end } """, """ PlainText[range=(0,17), content=public class X { ] StartRegion[range=(22,40), region=test] PlainText[range=(41,41), content=] PlainText[range=(41,57), content= void main() { ] Replace[range=(93,133), selector=Substring[substring=Hello], region=null, replacement=...] PlainText[range=(57,90), content= System.out.println("Hello");\s ] PlainText[range=(170,170), content=] Highlight[range=(141,167), selector=Substring[substring=Hello], region=null, type=HIGHLIGHTED] PlainText[range=(170,203), content= System.out.println("Hello"); ] PlainText[range=(229,229), content=] Highlight[range=(210,227), selector=WholeLine[], region=, type=HIGHLIGHTED] PlainText[range=(229,263), content= System.out.println("Hello1"); ] Link[range=(300,344), selector=Regex[pattern=H\\w+], region=null, target=Hello, linkType=LINKPLAIN] PlainText[range=(263,297), content= System.out.println("Hello2");\s ] EndRegion[range=(352,356), region=null] PlainText[range=(357,357), content=] PlainText[range=(357,361), content= } ] EndRegion[range=(366,370), region=null] PlainText[range=(371,371), content=] PlainText[range=(371,373), content=} ] PlainText[range=(373,373), content=]"""); }