Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

ghi fails to parse some issues and comments, blank output for ghi show #281

Closed
davidcelis opened this issue Apr 8, 2016 · 0 comments · Fixed by #282
Closed

ghi fails to parse some issues and comments, blank output for ghi show #281

davidcelis opened this issue Apr 8, 2016 · 0 comments · Fixed by #282

Comments

@davidcelis
Copy link
Contributor

In some cases, ghi fails to parse an Issue's body or the body of its comments. This is reproducible using both #273 (for the issue itself) and #274 (for the issue's comments).

$ ghi show 273 -- stephencelis/ghi
$

In the case of #274, some comment fails to parse. The issue's body prints out (although the fenced code block seems to break slightly with the third backtick not displaying) and we see "10 comments:" before the output just stops:

$ ghi -vv show 274 -- stephencelis/ghi
#274: When I use assign I get an error.
@K4stor opened this issue 59 days ago.   open  (10 comments)
 bug   unconfirmed 

    When I run ghi assign I get

    `` 
    /usr/local/bin/ghi:2917:in  execute': undefined method `sub!' for nil:NilClass (NoMethodError)
        from /usr/local/bin/ghi:2762:in `execute'
        from /usr/local/bin/ghi:91:in `execute'
        from /usr/local/bin/ghi:4285:in `<main>'
    ```


10 comments:

$

Here's some verbose output for both of the above commands.

$ ghi -vv show 273 -- stephencelis/ghi
===> GET /repos/stephencelis/ghi/issues/273 
<=== 200: {"url":"https://api.github.com/repos/stephencelis/ghi/issues/273","repository_url":"https://api.github.com/repos/stephencelis/ghi","labels_url":"https://api.github.com/repos/stephencelis/ghi/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/stephencelis/ghi/issues/273/comments","events_url":"https://api.github.com/repos/stephencelis/ghi/issues/273/events","html_url":"https://github.com/stephencelis/ghi/issues/273","id":129930467,"number":273,"title":"Feature request: emoji ","user":{"login":"orestes","id":618107,"avatar_url":"https://avatars.githubusercontent.com/u/618107?v=3","gravatar_id":"","url":"https://api.github.com/users/orestes","html_url":"https://github.com/orestes","followers_url":"https://api.github.com/users/orestes/followers","following_url":"https://api.github.com/users/orestes/following{/other_user}","gists_url":"https://api.github.com/users/orestes/gists{/gist_id}","starred_url":"https://api.github.com/users/orestes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orestes/subscriptions","organizations_url":"https://api.github.com/users/orestes/orgs","repos_url":"https://api.github.com/users/orestes/repos","events_url":"https://api.github.com/users/orestes/events{/privacy}","received_events_url":"https://api.github.com/users/orestes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stephencelis/ghi/labels/feature","name":"feature","color":"bfd4f2"},{"url":"https://api.github.com/repos/stephencelis/ghi/labels/help%20wanted","name":"help wanted","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-30T02:30:25Z","updated_at":"2016-02-03T21:03:58Z","closed_at":null,"pull_request":{"url":null,"html_url":null,"diff_url":null,"patch_url":null},"body":"Loving it so far.\r\nSome of the tools I use create PRs and add emojis to them. Right now ghi displays them like this:\r\n\r\n```\r\n  10: Update mocha to version 2.4.5 <U+1F680> 1 ↑\r\n   9: Update chai to version 3.5.0 <U+1F680> 1 ↑\r\n   8: Update mocha to version 2.4.4 <U+1F680> 1 ↑\r\n   7: Update mocha to version 2.4.3 <U+1F680> 1 ↑\r\n   6: Update mocha to version 2.4.2 <U+1F680> ↑\r\n   5: Update mocha to version 2.4.1 <U+1F680> 1 ↑\r\n   4: Update commitizen to version 2.5.0 <U+1F680> 1 ↑\r\n   3: Update istanbul to version 0.4.2 <U+1F680> 1 ↑\r\n   2: Get a specific number of aliases\r\n   1: Remove commitizen warnings\r\n```\r\n\r\nIt'd be awesome to get emojis in the terminal.","closed_by":null}
$ ghi -vv show 274 -- stephencelis/ghi
===> GET /repos/stephencelis/ghi/issues/274 
<=== 200: {"url":"https://api.github.com/repos/stephencelis/ghi/issues/274","repository_url":"https://api.github.com/repos/stephencelis/ghi","labels_url":"https://api.github.com/repos/stephencelis/ghi/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/stephencelis/ghi/issues/274/comments","events_url":"https://api.github.com/repos/stephencelis/ghi/issues/274/events","html_url":"https://github.com/stephencelis/ghi/issues/274","id":132381674,"number":274,"title":"When I use assign I get an error.","user":{"login":"K4stor","id":1078043,"avatar_url":"https://avatars.githubusercontent.com/u/1078043?v=3","gravatar_id":"","url":"https://api.github.com/users/K4stor","html_url":"https://github.com/K4stor","followers_url":"https://api.github.com/users/K4stor/followers","following_url":"https://api.github.com/users/K4stor/following{/other_user}","gists_url":"https://api.github.com/users/K4stor/gists{/gist_id}","starred_url":"https://api.github.com/users/K4stor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K4stor/subscriptions","organizations_url":"https://api.github.com/users/K4stor/orgs","repos_url":"https://api.github.com/users/K4stor/repos","events_url":"https://api.github.com/users/K4stor/events{/privacy}","received_events_url":"https://api.github.com/users/K4stor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stephencelis/ghi/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/stephencelis/ghi/labels/unconfirmed","name":"unconfirmed","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-09T10:23:38Z","updated_at":"2016-02-09T11:28:03Z","closed_at":null,"pull_request":{"url":null,"html_url":null,"diff_url":null,"patch_url":null},"body":"When I run ghi assign I get \r\n\r\n``` \r\n/usr/local/bin/ghi:2917:in `execute': undefined method `sub!' for nil:NilClass (NoMethodError)\r\n\tfrom /usr/local/bin/ghi:2762:in `execute'\r\n\tfrom /usr/local/bin/ghi:91:in `execute'\r\n\tfrom /usr/local/bin/ghi:4285:in `<main>'\r\n```","closed_by":null}
#274: When I use assign I get an error.
@K4stor opened this issue 59 days ago.   open  (10 comments)
 bug   unconfirmed 

    When I run ghi assign I get

    `` 
    /usr/local/bin/ghi:2917:in  execute': undefined method `sub!' for nil:NilClass (NoMethodError)
        from /usr/local/bin/ghi:2762:in `execute'
        from /usr/local/bin/ghi:91:in `execute'
        from /usr/local/bin/ghi:4285:in `<main>'
    ```


10 comments:

^M===> GET /repos/stephencelis/ghi/issues/274/events?per_page=100 
^M===> GET /repos/stephencelis/ghi/issues/274/comments?per_page=100 
^M<=== 200: [{"id":544150636,"url":"https://api.github.com/repos/stephencelis/ghi/issues/events/544150636","actor":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"event":"labeled","commit_id":null,"commit_url":null,"created_at":"2016-02-09T10:29:48Z","label":{"name":"bug","color":"f7c6c7"}},{"id":544150637,"url":"https://api.github.com/repos/stephencelis/ghi/issues/events/544150637","actor":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"event":"labeled","commit_id":null,"commit_url":null,"created_at":"2016-02-09T10:29:48Z","label":{"name":"unconfirmed","color":"bfe5bf"}}]
^M<=== 200: [{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181804111","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181804111","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181804111,"user":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T10:29:49Z","updated_at":"2016-02-09T10:29:49Z","body":"Can't reproduce this, can you provide an example repo where this occurs on?"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181812329","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181812329","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181812329,"user":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T10:49:43Z","updated_at":"2016-02-09T10:49:43Z","body":"Can you also confirm which version of `ghi` you are running? `ghi -v`?"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181814768","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181814768","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181814768,"user":{"login":"K4stor","id":1078043,"avatar_url":"https://avatars.githubusercontent.com/u/1078043?v=3","gravatar_id":"","url":"https://api.github.com/users/K4stor","html_url":"https://github.com/K4stor","followers_url":"https://api.github.com/users/K4stor/followers","following_url":"https://api.github.com/users/K4stor/following{/other_user}","gists_url":"https://api.github.com/users/K4stor/gists{/gist_id}","starred_url":"https://api.github.com/users/K4stor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K4stor/subscriptions","organizations_url":"https://api.github.com/users/K4stor/orgs","repos_url":"https://api.github.com/users/K4stor/repos","events_url":"https://api.github.com/users/K4stor/events{/privacy}","received_events_url":"https://api.github.com/users/K4stor/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T10:54:53Z","updated_at":"2016-02-09T10:54:53Z","body":"Hi \r\n\r\nghi version 1.0.4\r\nhttps://github.com/imgly/imgly-sdk-ios"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181815380","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181815380","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181815380,"user":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T10:58:11Z","updated_at":"2016-02-09T10:58:11Z","body":"Can you post the command you are trying to run? Is it just `ghi assign`? I.e. with no arguments?"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181816306","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181816306","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181816306,"user":{"login":"K4stor","id":1078043,"avatar_url":"https://avatars.githubusercontent.com/u/1078043?v=3","gravatar_id":"","url":"https://api.github.com/users/K4stor","html_url":"https://github.com/K4stor","followers_url":"https://api.github.com/users/K4stor/followers","following_url":"https://api.github.com/users/K4stor/following{/other_user}","gists_url":"https://api.github.com/users/K4stor/gists{/gist_id}","starred_url":"https://api.github.com/users/K4stor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K4stor/subscriptions","organizations_url":"https://api.github.com/users/K4stor/orgs","repos_url":"https://api.github.com/users/K4stor/repos","events_url":"https://api.github.com/users/K4stor/events{/privacy}","received_events_url":"https://api.github.com/users/K4stor/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T11:00:14Z","updated_at":"2016-02-09T11:00:14Z","body":"```\r\nghi assign 94\r\n```"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181817342","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181817342","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181817342,"user":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T11:02:46Z","updated_at":"2016-02-09T11:02:46Z","body":"Interesting, do you have rights over this repo? Can you assign people in the GitHub web interface?"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181817878","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181817878","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181817878,"user":{"login":"K4stor","id":1078043,"avatar_url":"https://avatars.githubusercontent.com/u/1078043?v=3","gravatar_id":"","url":"https://api.github.com/users/K4stor","html_url":"https://github.com/K4stor","followers_url":"https://api.github.com/users/K4stor/followers","following_url":"https://api.github.com/users/K4stor/following{/other_user}","gists_url":"https://api.github.com/users/K4stor/gists{/gist_id}","starred_url":"https://api.github.com/users/K4stor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K4stor/subscriptions","organizations_url":"https://api.github.com/users/K4stor/orgs","repos_url":"https://api.github.com/users/K4stor/repos","events_url":"https://api.github.com/users/K4stor/events{/privacy}","received_events_url":"https://api.github.com/users/K4stor/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T11:05:35Z","updated_at":"2016-02-09T11:06:31Z","body":"Yes I just assigned myself to imgly/imgly-sdk-ios#94 as a test"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181818128","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181818128","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181818128,"user":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T11:06:58Z","updated_at":"2016-02-09T11:06:58Z","body":"Is it specific to that repo? Can you assign yourself to issues on other repos?"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181821452","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181821452","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181821452,"user":{"login":"K4stor","id":1078043,"avatar_url":"https://avatars.githubusercontent.com/u/1078043?v=3","gravatar_id":"","url":"https://api.github.com/users/K4stor","html_url":"https://github.com/K4stor","followers_url":"https://api.github.com/users/K4stor/followers","following_url":"https://api.github.com/users/K4stor/following{/other_user}","gists_url":"https://api.github.com/users/K4stor/gists{/gist_id}","starred_url":"https://api.github.com/users/K4stor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K4stor/subscriptions","organizations_url":"https://api.github.com/users/K4stor/orgs","repos_url":"https://api.github.com/users/K4stor/repos","events_url":"https://api.github.com/users/K4stor/events{/privacy}","received_events_url":"https://api.github.com/users/K4stor/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T11:18:11Z","updated_at":"2016-02-09T11:20:15Z","body":"yes same problem with https://github.com/K4stor/blog/issues/1\r\n\r\nother commands like list or show work... so its not a general issue"},{"url":"https://api.github.com/repos/stephencelis/ghi/issues/comments/181825127","html_url":"https://github.com/stephencelis/ghi/issues/274#issuecomment-181825127","issue_url":"https://api.github.com/repos/stephencelis/ghi/issues/274","id":181825127,"user":{"login":"AlexChesters","id":10558792,"avatar_url":"https://avatars.githubusercontent.com/u/10558792?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexChesters","html_url":"https://github.com/AlexChesters","followers_url":"https://api.github.com/users/AlexChesters/followers","following_url":"https://api.github.com/users/AlexChesters/following{/other_user}","gists_url":"https://api.github.com/users/AlexChesters/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexChesters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexChesters/subscriptions","organizations_url":"https://api.github.com/users/AlexChesters/orgs","repos_url":"https://api.github.com/users/AlexChesters/repos","events_url":"https://api.github.com/users/AlexChesters/events{/privacy}","received_events_url":"https://api.github.com/users/AlexChesters/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T11:28:03Z","updated_at":"2016-02-09T11:28:03Z","body":"Strange error though, I'm going to leave this open and hopefully I'll get around to looking at it."}]
davidcelis added a commit to davidcelis/ghi that referenced this issue Apr 8, 2016
If `ghi` was installed via Homebrew before pygments.rb was added as a
dependency, the check for pygments being installed never gets run. It
looks like there was intention to rescue that `require` statement but
because `LoadError` doesn't inherit from `StandardError`, the exception
was uncaught and `ghi` would silently exit. This only seems to happen
currently on issues that include fenced code blocks, but I provided
reproducible evidence in stephencelis#281. Merging this will fix stephencelis#281, but I have
two concerns about the fact that pygments.rb was included as a
dependency in the first place:

1. Homebrew doesn't install Ruby gems for you, so this has to be done
   manually. Attempting to `brew install ghi` without first having run
   `gem install pygments.rb` just outputs an error and doesn't finish.
2. Most Ruby developers install several versions of Ruby using a version
   manager like rvm, rbenv, or chruby. You can `gem install pygments.rb`
   on one version of Ruby (or `sudo gem install pygments.rb` on the
   system version of Ruby, which is a whole other problem) but as soon
   as you try to use `ghi` after switching Rubies, you have to remember
   to install `pygments.rb`. This isn't great.

I see two solutions here. We can either no longer offer a Homebrew
formula, instead urging users to just install via `gem install ghi` or
we can remove pygments.rb as a dependency. Personally I think `ghi`
should try to remain free of dependencies for this reason, but I leave
it in your hands.

Signed-off-by: David Celis <me@davidcel.is>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant