Skip to content

new link ids#123

Merged
willmcgugan merged 3 commits intomasterfrom
style-id
Jun 24, 2020
Merged

new link ids#123
willmcgugan merged 3 commits intomasterfrom
style-id

Conversation

@willmcgugan
Copy link
Member

@willmcgugan willmcgugan commented Jun 24, 2020

Adds a link id to the Style class. Link ids are used when generating the ansi codes for links, so that the terminal knows which cells to highlight.

Formerly if a link contained multiple styles, the terminal would highlight individually styled portions of text on hover rather than the entire link.

For example, printing this would look like the words Hello and World were two links, when they are actually one link.

"[link=https://example.org]Hello [b]World![/b][/link]"

This PR fixes that.

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

@willmcgugan willmcgugan merged commit be9ebcb into master Jun 24, 2020
@willmcgugan willmcgugan deleted the style-id branch June 24, 2020 20:27
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.

1 participant