@@ -442,6 +442,10 @@ def update_optional_tags(line, tags=None, *, add_tags=None, remove_tags=None, fo
442
442
....: force_rewrite=True),
443
443
....: update_optional_tags(' sage: also_already_aligned() # ne' 'eds scipy',
444
444
....: force_rewrite='standard'),
445
+ ....: update_optional_tags(' sage: two_columns_first_preserved() # long time # ne' 'eds scipy',
446
+ ....: force_rewrite='standard'),
447
+ ....: update_optional_tags(' sage: two_columns_first_preserved() # long time # ne' 'eds scipy',
448
+ ....: force_rewrite='standard'),
445
449
....: ])
446
450
| V V V V V V v v v v
447
451
| sage: unforced() # optional - latte_int
@@ -451,6 +455,8 @@ def update_optional_tags(line, tags=None, *, add_tags=None, remove_tags=None, fo
451
455
| sage: aligned_with_below() # optional - 4ti2
452
456
| sage: aligned_with_above() # optional - 4ti2
453
457
| sage: also_already_aligned() # needs scipy
458
+ | sage: two_columns_first_preserved() # long time # needs scipy
459
+ | sage: two_columns_first_preserved() # long time # needs scipy
454
460
455
461
Rewriting a persistent (block-scoped) tag::
456
462
@@ -517,21 +523,21 @@ def update_optional_tags(line, tags=None, *, add_tags=None, remove_tags=None, fo
517
523
break
518
524
line += ' '
519
525
520
- if (group ['optional' ] or group ['special' ]) and (group ['standard' ] or group ['sage' ]):
521
- # Try if two-column mode works better
522
- first_part = unparse_optional_tags ({tag : explanation
523
- for tag , explanation in new_tags .items ()
524
- if (tag in group ['optional' ]
525
- or tag in group ['special' ])})
526
- column = standard_tag_columns [0 ]
527
- if len (line + first_part ) + 8 <= column :
528
- line += first_part
529
- line += ' ' * (column - len (line ))
530
- line += unparse_optional_tags ({tag : explanation
531
- for tag , explanation in new_tags .items ()
532
- if not (tag in group ['optional' ]
533
- or tag in group ['special' ])})
534
- return line .rstrip ()
526
+ if (group ['optional' ] or group ['special' ]) and (group ['standard' ] or group ['sage' ]):
527
+ # Try if two-column mode works better
528
+ first_part = unparse_optional_tags ({tag : explanation
529
+ for tag , explanation in new_tags .items ()
530
+ if (tag in group ['optional' ]
531
+ or tag in group ['special' ])})
532
+ column = standard_tag_columns [0 ]
533
+ if len (line + first_part ) + 8 <= column :
534
+ line += first_part
535
+ line += ' ' * (column - len (line ))
536
+ line += unparse_optional_tags ({tag : explanation
537
+ for tag , explanation in new_tags .items ()
538
+ if not (tag in group ['optional' ]
539
+ or tag in group ['special' ])})
540
+ return line .rstrip ()
535
541
536
542
line += unparse_optional_tags (new_tags )
537
543
return line
0 commit comments