Project Information
- Repository: https://github.com/jakipatryk/steeditor
- Project Name: Steeditor.app
- Publisher:
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 , 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
non-markdown links are not included in
json_metadata['links']. This is a problem for the utopian templates, since they propose the target repository as non-markdown links, but the utopian-spreadsheet repo parsesjson_metadata['links']for that string:
https://github.com/amosbastian/utopian-spreadsheet/blob/b4953e9af7910ffc3336a1945c3b31ae16aafb72/spreadsheet.py#L50
The target repository is not necessarily detected correctly in this case.user-mentions are found within markdown URLs. This is not necessarily a bug, only inconsistent to other interfaces.
How to reproduce
Two test posts with the same body: utopian template + one image + a markdown link
- from steeditor: steemd
{"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"}
- from steemit steemd
{"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
linkssection, 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 inlinks - 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 ausersfield.
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