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

Use a more robust ANSI regex for text length calculation #305

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

romannurik
Copy link
Contributor

This fixes an issue where links inside list items rendered poorly.

Note that the new dependency (ansi-regex is tiny and also MIT-licensed)

Example markdown

Here are some space opera recommendations focused on exploring the galaxy and different cultures within it: 

1.  **[The Long Way to a Small, Angry Planet](https://play.google.com/store/books/details?id=dgFxCQAAQBAJ&source=gbs_api)** 
    ![The Long Way to a Small, Angry Planet](http://books.google.com/books/content?id=dgFxCQAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api)
    This book is a feel-good space opera that follows a crew on a spaceship as they build a hyperspace tunnel to a distant planet. It's full of interesting alien characters and touches on themes of identity, friendship, and belonging.

2.  **[Look to Windward](https://play.google.com/store/books/details?id=HovpJmfv4wAC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api)** 
    ![Look to Windward](http://books.google.com/books/content?id=HovpJmfv4wAC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api)
    This book is part of Iain M. Banks' Culture series, which is known for its focus on advanced technology and utopian societies. This book focuses on the Culture's interactions with other cultures and the potential conflicts that arise from their differing views. 

Before this PR:

Before

After this PR:

image

Copy link
Owner

@mikaelbr mikaelbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! Thank you!

@mikaelbr mikaelbr merged commit 0bc8c65 into mikaelbr:master Aug 12, 2024
17 checks passed
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