fedimbed.bluesky: not all urls get truncated
This commit is contained in:
parent
4f9bc956a3
commit
0e4ac6dfa0
1 changed files with 5 additions and 1 deletions
|
@ -159,7 +159,11 @@ function processBlueskyFacets(str, facets) {
|
|||
for (const feature of part.features) {
|
||||
switch (feature.$type) {
|
||||
case "app.bsky.richtext.facet#link": {
|
||||
if (part.text == feature.uri.replace(/^https?:\/\//, "") || part.text.endsWith("...")) {
|
||||
if (
|
||||
part.text === feature.uri ||
|
||||
part.text === feature.uri.replace(/^https?:\/\//, "") ||
|
||||
part.text.endsWith("...")
|
||||
) {
|
||||
part.text = feature.uri;
|
||||
} else {
|
||||
part.text = `[${part.text}](${feature.uri})`;
|
||||
|
|
Loading…
Reference in a new issue