anyproto / anyproto/anytype-api

Incorrect names of links to anytype objects in markdown body

Open
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
113
Forks
20
Avg merge
16m
Merged PRs (30d)
1

Description

Have you read a contributing guide?
  • I have read CONTRIBUTING.md
  • I have searched the existing issues and didn't find any that were similar
  • I have considered creating a pull request with fixes instead of a bug report and want to proceed
Current Behavior

In string from anytype like this:
Image

Links to objects In markdown body by GET object query looks not correct. In markdown it is:
🟢 blablabla w[wweeerrr ](anytype://object?objectId=bafyreicmy2rdftzyh5ucvrt7nhc2jxqtagfil5ngryqpybyu35dt2n2vsq)T[EST2 ](anytype://object?objectId=bafyreialxchtguee2xd6ahcrkkueqhykj3du3hn3hp6sszl36wm5q7t66u)n[ewnote ](anytype://object?objectId=bafyreie22itdgoow5dufagpzt6l43unnevpb2g7w6hujfsmitvaiev6wcm)e[xist ](anytype://object?objectId=bafyreih63k4qgijyboegwdxycrmjjpjwqqvwdv6omhycisrvle76odnhca)H[abit Tracker ](anytype://object?objectId=bafyreiddezjcvz22ebb45o3xczf3t2oszbuq24jgojskl2vzms66vmyb2e)q[wewww ](anytype://object?objectId=bafyreif2567jistu3zv66tezrynflfmitny7xue3bjs7j5yozsnrnajzgm)q[wewww ](anytype://object?objectId=bafyreif2567jistu3zv66tezrynflfmitny7xue3b7j5yozsnrnajzgm)

you can see w[wweeerrr ] instead of [wwweeerrr] or T[EST2 ] instead of [TEST2]. The first letter went out of frame

Expected Behavior

I get correct links in this case

Steps To Reproduce
  1. Just create the same string with links
Image 2. And use API-get-object query to get it in markdown 3. Fail
Environment
- OS: macos
- Version: 0.49.2
Anything else?

I am open to provide additional info.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the GET object query with the markdown string and examples from the issue. Trace how linked object names are converted into markdown labels; done means the returned markdown preserves the complete link text, including its first character.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.