@@ -390,18 +390,9 @@ class StyledElementBuiltIn extends HtmlExtension {
390
390
case "strong" :
391
391
continue bold;
392
392
case "sub" :
393
- if (_hasOnlyDigits (children)) {
394
- // We can use FontFeature.subscripts since this just looks nice
395
- styledElement.style = Style (
396
- fontFeatureSettings: [const FontFeature .subscripts ()],
397
- );
398
- } else {
399
- // For the rest we should just reduce the height of the text
400
- // Using WidgetSpan with translation should not be used because line breaks can occur just before subscript text
401
- styledElement.style = Style (
402
- fontSize: FontSize (50 , Unit .percent),
403
- );
404
- }
393
+ styledElement.style = Style (
394
+ fontSize: FontSize (50 , Unit .percent),
395
+ );
405
396
break ;
406
397
case "summary" :
407
398
styledElement.style = Style (
@@ -429,20 +420,6 @@ class StyledElementBuiltIn extends HtmlExtension {
429
420
return styledElement;
430
421
}
431
422
432
- bool _hasOnlyDigits (List <StyledElement > children) {
433
- if (children.isEmpty) return true ;
434
- for (var child in children) {
435
- if (child is TextContentElement ) {
436
- final text = child.text;
437
- if (text == null || text.isEmpty) continue ;
438
- for (int codeUnit in text.codeUnits) {
439
- if ((codeUnit ^ 0x30 ) > 9 ) return false ;
440
- }
441
- }
442
- }
443
- return true ;
444
- }
445
-
446
423
@override
447
424
InlineSpan build (ExtensionContext context) {
448
425
if (context.styledElement! .style.display == Display .listItem ||
0 commit comments