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

Html - Bold text in ListItem #3

Closed
fairEnough83 opened this issue Apr 22, 2022 · 1 comment
Closed

Html - Bold text in ListItem #3

fairEnough83 opened this issue Apr 22, 2022 · 1 comment
Labels
good first issue Good for newcomers

Comments

@fairEnough83
Copy link

fairEnough83 commented Apr 22, 2022

Great library, thank you for this. Just found one issue. I cannot add a bold text segment inside an unordered list.

<li>Tap to open the <b>phone settings</b> and search for <b>Device Care</b></li>

this is rendering a list item but the text contain the bold tags. Is this on purpose? How can I achieve that the bold segments are rendered bold as well?

@DmytroShuba
Copy link
Owner

Thank you! I'm glad you like the library.
DailyTags does not support nested tags yet. You can find the full list of supported features here.

However, nested tags support will be added in future releases.

For now, the easiest way to get around this restriction would be to additionally parse the content to reach the nested tags.

    // render list first and retrieve the final string
    val renderedList = parser.parse(source, rules).render().toAnnotatedString().text
    // now render what is inside list (second level tags)
    val renderedBold = parser.parse(renderedList, rules).render().toAnnotatedString()

    Text(text = renderedBold)

Let me know if it works for you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants