| 1 |
# 7.0 Migration Notes {: #\7.0} |
| 2 |
|
| 3 |
## Tabbed Extension |
| 4 |
|
| 5 |
A new extension called Tabbed has been added. With the arrival of this general purpose tabbed content extension, it has |
| 6 |
made the old SuperFences tabbed content feature redundant. By default, SuperFences will now change the classes it uses |
| 7 |
for it's tabbed feature to match those of the new Tabbed extension. CSS should be updated accordingly. |
| 8 |
|
| 9 |
The classes that have changed are `superfences-tabs` and `superfences-content`, which have changed to `tabbed-set` and |
| 10 |
`tabbed-content` respectively. Example CSS is updated in SuperFences for |
| 11 |
[reference](../../extensions/superfences.md). |
| 12 |
|
| 13 |
To help with the transition though, you can quickly switch back to the old style classes by simply enabling the |
| 14 |
SuperFences' global option `legacy_tab_classes`: |
| 15 |
|
| 16 |
```py3 |
| 17 |
extension_configs = { |
| 18 |
"pymdownx.superfences": { |
| 19 |
"legacy_tab_classes": True |
| 20 |
} |
| 21 |
} |
| 22 |
``` |
| 23 |
|
| 24 |
To learn more about migrating to the Tabbed extension, checkout the [Tabbed documentation](../../extensions/tabbed.md). |
| 25 |
|
| 26 |
SuperFences' tab content feature will be removed in 8.0. There is no formal date for when this will occur, but it is |
| 27 |
recommended to begin migrating as soon as possible, but `legacy_tab_classes` can be used as a stop gap for the short |
| 28 |
term. |
| 29 |
|
| 30 |
## Option Deprecation in SuperFences |
| 31 |
|
| 32 |
SuperFences has deprecated `highlight_code`. This option now does nothing and will be removed in some future release. |
| 33 |
If this option was used, you will have to use [custom fences](../../extensions/superfences.md#custom-fences) to |
| 34 |
implement this behavior with your own custom formatter. |
| 35 |
|
| 36 |
## SuperFences Configurable Classes and IDs |
| 37 |
|
| 38 |
Additional classes and IDs can now be injected into fenced code blocks with the format ` ```{.lang .more-class} `. |
| 39 |
|
| 40 |
The attribute list feature also impacts the custom formatter. While the default formatters will still inject classes and |
| 41 |
IDs to the top level element to preserve backwards compatibility, the formatter now must accept the new keyword |
| 42 |
parameters `classes` and `id_value`. If you have a custom formatter that does not adhere to this new requirement, you |
| 43 |
will see a user warning. |
| 44 |
|
| 45 |
The new format is: |
| 46 |
|
| 47 |
```py3 |
| 48 |
def custom_formatter(source, language, css_class, options, md, classes=None, id_value='', **kwargs): |
| 49 |
return string |
| 50 |
``` |
| 51 |
|
| 52 |
While it is recommended for a user to update their custom formatters to receive the new parameters, at the very |
| 53 |
least, users should add `**kwargs` to future proof their formatters. |
| 54 |
|
| 55 |
## CodeHilite Separation |
| 56 |
|
| 57 |
SuperFences and InlineHilite no longer sync settings from CodeHilite. To configure either of the extensions, Pymdown |
| 58 |
Extension's Highlight extension must be used. CodeHilite can be run along side Highlight if desired, but CodeHilite |
| 59 |
cannot be used to augment SuperFences or InlineHilite's behavior. |
| 60 |
|
| 61 |
## Keys Alias Changes |
| 62 |
|
| 63 |
Previously `alt`, `left-alt`, and `right-alt` had aliases `menu`, `left-menu`, `right-menu`, `lmenu`, and `rmenu`. These |
| 64 |
aliases have been removed. `menu` will now be an alias for `context-menu`. |
| 65 |
|
| 66 |
It is known that *Alt* has been referred to as *Menu* in the real world, but so is the actual *Menu*/*Apps* key. This |
| 67 |
will hopefully create less confusion in the long term, even if there is a little in the short term. |