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

admonition text-wrap failure in version 2.4.2 #242

Closed
zillionare opened this issue May 22, 2024 · 5 comments
Closed

admonition text-wrap failure in version 2.4.2 #242

zillionare opened this issue May 22, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@zillionare
Copy link

Description

tested in version 2.4.2, admonition failed to wrap extra-length lines:

image

this works in version 2.3.1, 2.3.2 (no test beyond version 2.3.2)

image

Proposed solution

text in admonition should wrap up.

Additional notes

seems admonition text was rendered as code.

@zillionare zillionare added the bug Something isn't working label May 22, 2024
Copy link

welcome bot commented May 22, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@agoose77
Copy link
Collaborator

Hi, could you share the source for your bug report? It looks like your content is being embedded in the admonition as a code-block, so it's not being wrapped.

@zillionare
Copy link
Author

zillionare commented May 23, 2024

the source:

\``` {note}
    plotly 中的轴类型有 linear(默认), log, date, category 和 multicategory。如果我们没有指定轴类型,plotly 会按以下顺序猜测轴类型:multicategory(只有数据本身是嵌套数组时)、date 或者 category(在我们最初的例子,会被优先判定为 date 型,从而终推断),如果还不能决定,将使用 linear。
\```

for testing, please remove backslash.

@zillionare
Copy link
Author

lesson17.ipynb.zip
in case you need the whole file

@agoose77
Copy link
Collaborator

Admonition contents must not be indented unless you wish for them to be parsed as code-blocks :), i.e.

``` {note}
plotly 中的轴类型有 linear(默认), log, date, category 和 multicategory。如果我们没有指定轴类型,plotly 会按以下顺序猜测轴类型:multicategory(只有数据本身是嵌套数组时)、date 或者 category(在我们最初的例子,会被优先判定为 date 型,从而终推断),如果还不能决定,将使用 linear。
```

P.s., you can nested fenced blocks like admonitions by ensuring the number of backticks increases from inside-to-out, e.g.

````note
This contains a figure!
```figure foo.png
```
````

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants