@@ -270,44 +270,46 @@ protected override void RenderQuote(QuoteBlock element, IRenderContext context)
270
270
else if ( firstInline is TextRunInline textRunInline )
271
271
{
272
272
var key = textRunInline . Text . Split ( ' ' ) . FirstOrDefault ( ) ;
273
- if ( styles . TryGetValue ( key , out var style ) && ! style . Ignore )
273
+ if ( styles . TryGetValue ( key , out var style ) )
274
274
{
275
- noteType = style ;
276
- header = style . IdentifierReplacement ;
277
- symbolGlyph = style . Glyph ;
275
+ if ( ! style . Ignore )
276
+ {
277
+ noteType = style ;
278
+ header = style . IdentifierReplacement ;
279
+ symbolGlyph = style . Glyph ;
278
280
279
- // Removes the identifier from the text
280
- textRunInline . Text = textRunInline . Text . Replace ( key , string . Empty ) ;
281
+ // Removes the identifier from the text
282
+ textRunInline . Text = textRunInline . Text . Replace ( key , string . Empty ) ;
281
283
282
- if ( theme == ElementTheme . Light )
283
- {
284
- localForeground = style . LightForeground ;
285
- localBackground = style . LightBackground ;
286
- }
287
- else
288
- {
289
- localForeground = new SolidColorBrush ( Colors . White ) ;
290
- localBackground = style . DarkBackground ;
291
- }
284
+ if ( theme == ElementTheme . Light )
285
+ {
286
+ localForeground = style . LightForeground ;
287
+ localBackground = style . LightBackground ;
288
+ }
289
+ else
290
+ {
291
+ localForeground = new SolidColorBrush ( Colors . White ) ;
292
+ localBackground = style . DarkBackground ;
293
+ }
292
294
293
- // Apply special formatting context.
294
- if ( noteType != null )
295
- {
296
- if ( localContext ? . Clone ( ) is UIElementCollectionRenderContext newContext )
295
+ // Apply special formatting context.
296
+ if ( noteType != null )
297
297
{
298
- localContext = newContext ;
298
+ if ( localContext ? . Clone ( ) is UIElementCollectionRenderContext newContext )
299
+ {
300
+ localContext = newContext ;
299
301
300
- localContext . TrimLeadingWhitespace = true ;
301
- QuoteForeground = Foreground ;
302
- LinkForeground = localForeground ;
302
+ localContext . TrimLeadingWhitespace = true ;
303
+ QuoteForeground = Foreground ;
304
+ LinkForeground = localForeground ;
305
+ }
303
306
}
304
307
}
305
- }
306
-
307
- if ( style . Ignore )
308
- {
309
- // Blank entire block
310
- textRunInline . Text = string . Empty ;
308
+ else
309
+ {
310
+ // Blank entire block
311
+ textRunInline . Text = string . Empty ;
312
+ }
311
313
}
312
314
}
313
315
}
0 commit comments