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

Icons in 'Presentation' components (e.g. box, panels, tabs) are not rendered properly #2371

Closed
jmestxr opened this issue Oct 9, 2023 · 6 comments · Fixed by #2399 or #2415
Closed
Assignees
Labels

Comments

@jmestxr
Copy link
Contributor

jmestxr commented Oct 9, 2023

Please confirm that you have searched existing issues in the repo

Yes, I have searched the existing issues

Any related issues?

No response

Tell us about your environment

applicable for all

MarkBind version

5.1.0

Describe the bug and the steps to reproduce it

Icons in 'Presentation' components are not rendered properly with indentation. For example, the following block of code:

Screenshot 2023-10-09 at 8 23 24 PM

produces

Screenshot 2023-10-09 at 8 24 06 PM

Moreover, presence/absence of newlines also affect rendering. For example,

Screenshot 2023-10-09 at 8 27 27 PM

produces

Screenshot 2023-10-09 at 8 27 32 PM

but

Screenshot 2023-10-09 at 8 28 21 PM

produces

Screenshot 2023-10-09 at 8 28 16 PM

Expected behavior

Icons should be rendered properly in these components, regardless of indentation size/newlines.

Anything else?

No response

@jmestxr jmestxr changed the title Content in tabs only supports text Icons in tabs are not rendered properly Oct 9, 2023
@jmestxr jmestxr changed the title Icons in tabs are not rendered properly Icons in 'Presentation' components (e.g. box, panels, tabs) are not rendered properly Oct 9, 2023
@jmestxr jmestxr added s.ToInvestigate p.High To be done in the next few releases and removed p.Medium labels Oct 9, 2023
@damithc
Copy link
Contributor

damithc commented Oct 9, 2023

@jmestxr From what I know, MarkBind (due to the parser used) follows the Markdown rule that requires a blank line to separate Markdown text from other text (e.g., HTML text). Otherwise the text is not parsed an Markdown but treated as plain text (I think).

Even GitHub behave the same way e.g.,

<p>
**abc**
</p>

Output: **abc**

@jmestxr
Copy link
Contributor Author

jmestxr commented Oct 10, 2023

@damithc I see. Indentation may also cause text with icons to be parsed as plain text. Perhaps we could put a note in UG stating that per Markdown rule, a new line and no indentation should be included when including content in tabs/panels/boxes?

@damithc
Copy link
Contributor

damithc commented Oct 10, 2023

@damithc I see. Indentation may also cause text with icons to be parsed as plain text. Perhaps we could put a note in UG stating that per Markdown rule, a new line and no indentation should be included when including content in tabs/panels/boxes?

Yes @jmestxr, I think that is a good idea.

@tlylt
Copy link
Contributor

tlylt commented Oct 10, 2023

@jmestxr we have a section here on this: https://markbind.org/userGuide/usingHtmlJavaScriptCss.html#markdown-in-html
but yes if the indentation is also important, we should highlight that. With that, we should probably add a dedicated section in https://markbind.org/userGuide/troubleshooting.html to highlight some common usage that may result in such error and how t o fix them

@damithc
Copy link
Contributor

damithc commented Oct 10, 2023

Keeping in mind that users will just read the section of the UG relevant to the component they want to use, perhaps we can do the following:

  • adjust the code examples (such as the one below) to have a blank line in the expected places
  • mention the need for a blank line in the UG section of each affected component (there will be duplication, but MarkBind can handle duplication using <inlcude .. >).

image

@yiwen101
Copy link
Contributor

Hi, I would like to give this issue a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants