diff options
author | ValdikSS <iam@valdikss.org.ru> | 2022-04-22 02:00:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 01:00:57 +0200 |
commit | ce18c948e620b658c19200d6875202877b2691a4 (patch) | |
tree | 229c76837307e597c3f6a0526b6197c5564957c2 /vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go | |
parent | 7bc93c55061c9272927b2bccffbff94a6959cfdc (diff) | |
download | matterbridge-msglm-ce18c948e620b658c19200d6875202877b2691a4.tar.gz matterbridge-msglm-ce18c948e620b658c19200d6875202877b2691a4.tar.bz2 matterbridge-msglm-ce18c948e620b658c19200d6875202877b2691a4.zip |
Do not apply any markup to URL entities (telegram) (#1808)
handleEntities code uses simple modification offset which does not
allow to detect whether the offset is placed before or after
the element in already modified string.
This works fine is most cases as Telegram server always sort the
elements by offset, in ascending order.
However, this is not the case when the modification, for example bold
text, is applied to the URL. In this case, the offset of URL and
bold entity is equal, which raises the issue.
This commit introduces additional hack for this case, stripping
any entities which intersect with URL.
Diffstat (limited to 'vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go')
0 files changed, 0 insertions, 0 deletions