Skip to content

Releases: apemsel/AttributedString

v3.0.0

29 Mar 16:09
Compare
Choose a tag to compare
  • Updated for modern PHP >= 8.1
  • Type definitions
  • Fixes for all remaining bugs found by static analysis
  • No more dependencies :-)

Full Changelog: v2.0.0...v3.0.0

First 2.x Release

16 Mar 09:46
Compare
Choose a tag to compare

New Features

  • Attribute storage is provided by classes implementing the Attribute Interface instead of directly in AttributedString
  • New Bitmap class implementing Attribute using a bitmap stored in a string. Very memory efficient.
  • BooleanArray class implementing Attribute using a standard PHP array like in AttributedString v1.x. Faster than Bitmap, but uses more than 8x the memory per char length of the string.
  • You can inject your own attribute implementations

Incompatible Changes with v1.x

  • Unimplemented methods now throw a RuntimeException instead of an InvalidArgumentException

v1.5.3

10 Mar 11:01
Compare
Choose a tag to compare
  • convert token offsets from byte to char offset

v1.5.2

08 Mar 14:49
Compare
Choose a tag to compare
  • another fix for tokenizeOnWords()

v1.5.1

08 Mar 14:37
Compare
Choose a tag to compare
  • fix unicode bug in tokenizeOnWords()

v1.5.0

07 Mar 10:55
Compare
Choose a tag to compare
  • ArrayAccess to tokens in TokenizedAttributedString

v1.4.0

05 Mar 21:23
Compare
Choose a tag to compare
  • Support ArrayAccess interface in AttributedString and MutableAttributedString
  • Fixed two bugs in MutableAttributedStrings

v1.3.0

04 Mar 12:59
Compare
Choose a tag to compare
  • toHtml() can now handle overlapping attribute spans, so all AttributedStrings can be converted to HTML and it no longer throws
  • new method attributeToString() for debugging/visualization
  • more tests and fixes

v1.2.1

03 Mar 14:58
Compare
Choose a tag to compare
  • fix bug in setTokenRangeAttribute()

v1.2.0

03 Mar 14:43
Compare
Choose a tag to compare
  • new methods filter() and substrings()
  • fix bug in searchAttribute()