Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed parsing of tab contents without indentation #50

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

d3m1d0v
Copy link
Member

@d3m1d0v d3m1d0v commented Jul 12, 2024

If the contents of tab don't contain indentation, the tabs-extension creates an invalid token stream. Example:

{% list tabs %}

- tab1

> quote

{% endlist %}

Tokens:

tabs_open,
tab-list_open,
tab_open,
inline,
tab_close,
tab-list_close,
tab-panel_open,
tab-panel_close,
tabs_close,
paragraph_close,
blockquote_close,
paragraph_open,
inline,
paragraph_close,

I fixed that case. Now this markup creates valid tokens:

"tabs_open",
"tab-list_open",
"tab_open",
"inline",
"tab_close",
"tab-list_close",
"tab-panel_open",
"tab-panel_close",
"tabs_close",

@d3m1d0v d3m1d0v requested a review from vsesh July 12, 2024 12:12
@d3m1d0v d3m1d0v changed the title fix: return valid tokens if tab content doesn't contain indentation fix: fixed parsing of tab contents without indentation Jul 12, 2024
@d3m1d0v d3m1d0v merged commit f5f4b86 into diplodoc-platform:master Jul 12, 2024
2 checks passed
@d3m1d0v d3m1d0v deleted the fix-tokens branch July 12, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants