Steeditor: Metadata inconsistency for links and user mentions

in #utopian-io6 years ago

Project Information

A GitHub Issue was created:

The bug was confirmed by the project owner. Even though the issue is still open, the main problem was fixed by @jakipatryk, as can be seen by this post's metadata.

Expected behavior

steeditor should put URLs and user mentions from the post body in the corresponding json_metadata fields

How to reproduce

Two test posts with the same body: utopian template + one image + a markdown link

{"app":"steeditor/0.1.0",
"format":"markdown",
"image":["https://steemitimages.com/0x0/https://user-images.githubusercontent.com/33018033/42889616-25f17de6-8aab-11e8-971e-e05abdb331e1.png"],
"tags":["not-utopian","not-analysis"],
"users":["stmdev"],
"links":["https://steemit.com/test/@stmdev/steeditor-test-1532283370486"],
"community":"steeditor"}
{"tags":["not-utopian","not-analysis"],
"image":["https://steemitimages.com/0x0/https://user-images.githubusercontent.com/33018033/42889616-25f17de6-8aab-11e8-971e-e05abdb331e1.png"],
"links":["https://github.com/utopian-io/utopian.io","https://steemit.com/test/@stmdev/steeditor-test-1532283370486"],
"app":"steemit/0.1",
"format":"markdown"}

Differences:

  • The steeditor metadata doesn't contain the repository in the links section, so the target repository may be empty or possibly wrong in the utopian review sheet. The steemit metadata contains the repository as the first entry in links
  • The steeditor metadata detects a user mention in the markdown link for @stmdev, while steemit treats this as part of the URL and doesn't add a users field.

With the fix, the non-markdown links are properly detected now:

The repository is set as the first entry in the links metadata and is, therefore, properly parsed by the utopian spreadsheet code.

Environment

steeditor.app as live on 2018-08-29
Chrome 68.0

GitHub Account

https://github.com/crokkon

Sort:  

Congratulations @stmdev! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of posts published

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard - Witness Update
SteemFest³ - SteemitBoard support the Travel Reimbursement Fund.

Support SteemitBoard's project! Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.33
TRX 0.11
JST 0.034
BTC 66407.27
ETH 3219.07
USDT 1.00
SBD 4.34