tabs

15 cases. Source: tests/tabs.json.

#1 canonical

Source

:::tabs
### macOS
`brew install markset`

### Windows
`winget install markset`
:::

Rendered

brew install markset

winget install markset

Downgrade

### macOS

`brew install markset`

### Windows

`winget install markset`

#2 active tab override

Source

:::tabs{active=2}
## A
a
## B
b
:::

Rendered

a

b

Downgrade

## A

a

## B

b

#3 deeper headings are tab content

Source

:::tabs
## A
### Sub
text
## B
:::

Rendered

Sub

text

Downgrade

## A

### Sub

text

## B

#4 label with inline markup

Source

:::tabs
### `npm`
x
:::

Rendered

x

Downgrade

### `npm`

x

#5 single tab

Source

:::tabs
### Only
x
:::

Rendered

x

Downgrade

### Only

x

#6 nested: a card inside a tab

Source

::::tabs
### A
:::card
x
:::
### B
y
::::

Rendered

x

y

Downgrade

### A

x

### B

y

#7 nested: tabs inside a card

Source

::::card
:::tabs
### A
x
:::
::::

Rendered

x

Downgrade

### A

x

#8 id and classes

Source

:::tabs{#install .compact}
### A
x
:::

Rendered

x

Downgrade

### A

x

#9 unclosed fence

Source

:::tabs
### A
x

Rendered

x

Downgrade

### A

x

Diagnostics: DIRECTIVE_UNCLOSED

#10 empty content

invalid

Source

:::tabs
:::

Rendered

Downgrade

(empty)

Diagnostics: TABS_NO_HEADINGS

#11 wrong content type: no headings

invalid

Source

:::tabs
just text
:::

Rendered

just text

Downgrade

just text

Diagnostics: TABS_NO_HEADINGS

#12 content before the first heading

invalid

Source

:::tabs
intro
### A
x
:::

Rendered

intro

A

x

Downgrade

intro

### A

x

Diagnostics: TABS_CONTENT_BEFORE_HEADING

#13 shallower heading is a mixed level

invalid

Source

:::tabs
### A
x
## B
y
:::

Rendered

A

x

B

y

Downgrade

### A

x

## B

y

Diagnostics: TABS_MIXED_LEVELS

#14 active out of range

invalid

Source

:::tabs{active=3}
### A
### B
:::

Rendered

Downgrade

### A

### B

Diagnostics: DIRECTIVE_INVALID_ATTRIBUTE

#15 active must be a positive integer

invalid

Source

:::tabs{active=0}
### A
:::

Rendered

Downgrade

### A

Diagnostics: DIRECTIVE_INVALID_ATTRIBUTE