@@ -59,14 +59,14 @@ public BlockContinue tryContinue(ParserState state) {
5959 * (with up to 3 leading spaces, optional space after '>')
6060 */
6161 var line = state .getLine ().getContent ();
62- int nextNonSpace = state .getNextNonSpaceIndex ();
62+ var nextNonSpace = state .getNextNonSpaceIndex ();
6363 if (state .getIndent () >= 4 // Parsing.CODE_BLOCK_INDENT
6464 || nextNonSpace >= line .length ()
6565 || line .charAt (nextNonSpace ) != '>' ) {
6666 return BlockContinue .none ();
6767 }
6868
69- int newColumn = state .getColumn () + state .getIndent () + 1 ;
69+ var newColumn = state .getColumn () + state .getIndent () + 1 ;
7070 if (Characters .isSpaceOrTab (line , nextNonSpace + 1 )) {
7171 newColumn ++;
7272 }
@@ -150,7 +150,7 @@ public BlockStart tryStart(ParserState state, MatchedBlockParser matchedBlockPar
150150 }
151151
152152 var line = state .getLine ().getContent ();
153- int nextNonSpace = state .getNextNonSpaceIndex ();
153+ var nextNonSpace = state .getNextNonSpaceIndex ();
154154
155155 // Case A: Fresh start. Line begins with '>'.
156156 if (nextNonSpace < line .length () && line .charAt (nextNonSpace ) == '>' ) {
@@ -205,24 +205,20 @@ private BlockStart tryStartFresh(CharSequence line, int nextNonSpace, ParserStat
205205 afterGt = state .getIndex ();
206206 }
207207
208- Matcher matcher ;
209- if (customTitlesAllowed ) {
210- matcher = ALERT_PATTERN_CUSTOM_TITLE .matcher (line .subSequence (afterGt , line .length ()));
211- } else {
212- matcher = ALERT_PATTERN_NO_CUSTOM_TITLE .matcher (line .subSequence (afterGt , line .length ()));
213- }
208+ var pattern = customTitlesAllowed ? ALERT_PATTERN_CUSTOM_TITLE : ALERT_PATTERN_NO_CUSTOM_TITLE ;
209+ var matcher = pattern .matcher (line .subSequence (afterGt , line .length ()));
214210
215211 if (!matcher .matches ()) {
216212 return BlockStart .none ();
217213 }
218214
219- String typeOriginalCase = matcher .group (1 );
220- String type = typeOriginalCase .toUpperCase (Locale .ROOT );
215+ var typeOriginalCase = matcher .group (1 );
216+ var type = typeOriginalCase .toUpperCase (Locale .ROOT );
221217 if (!allowedTypes .contains (type )) {
222218 return BlockStart .none ();
223219 }
224220
225- String titleContent = "" ;
221+ var titleContent = "" ;
226222 if (customTitlesAllowed ) {
227223 titleContent = matcher .group (2 ).replaceFirst ("^[ \\ t]+" , "" ).stripTrailing ();
228224 }
0 commit comments