Example comment: https://github.com/MichaelMure/git-bug/issues/69#issuecomment-430811694
On GitHub.com, the hash in the comment is converted to code, truncated to a smaller length, and linked to the actual commit.
Can GitHawk do this too?
Bug Report Dump (Auto-generated)
Version 1.23.0 (1539742783) Device: iPhone 8 (iOS 12.0.1) TestFlight: true
Is there a regex rule for commit hashes?
Sent with GitHawk
Yes, but unfortunately it’s [\da-f]{7,40}. You’d then have to check matching strings to see if they correspond to a real commit (on the plus side, if a commit is found, the SHA can be cached indefinitely). As a start, truncating and linkifying the 40-character ones would make them a lot easier to read.
Yikes that’s match tons of normal words. Sadly don’t think this will be possible without the API marking commit hashes.
Sent with GitHawk
Aha: GitHub has an API for rendering Markdown.
There’s also a way to get GitHub to send you the HTML for a given comment.
Unfortunately we’ve put a LOT of time and effort into making our markdown hella fast. Way faster than we’d get with Web views.
Sent with GitHawk
Could you use NSAttributedString to convert the HTML to a native string?
That uses a WebKit underneath and has to be done on the main thread.
Sent with GitHawk
At least the truncated display (first 7 digits) would help to view posts where commits are referenced...