Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GitHub Reply Comments) doesn't handle embedded references to code #144

Closed
aspiers opened this issue Jan 30, 2019 · 3 comments
Closed

(GitHub Reply Comments) doesn't handle embedded references to code #144

aspiers opened this issue Jan 30, 2019 · 3 comments

Comments

@aspiers
Copy link

aspiers commented Jan 30, 2019

For example, if I include a permalink to a code fragment in this repo:

String.format = function(string) {

and you try replying to this, you'll see a large chunk of HTML which GitHub expanded itself. ... Hrm weird, that didn't reproduce it, but I saw it when replying to this.

@jerone
Copy link
Owner

jerone commented Jan 30, 2019

Thanks for reporting, I can confirm this issue. My initial research shows that it's hard to detect when a code fragment is used, but I have some ideas. I'm currently in the process of rewriting the MarkDown part, to better support all different tags.

This issue is only reproducible on comments that are not your own and comments not in repos where you have admin permissions to.

@jerone jerone closed this as completed in d6144b9 Feb 2, 2019
@jerone
Copy link
Owner

jerone commented Feb 2, 2019

@aspiers commented on Jan 30, 2019, 11:10 AM GMT+1:

For example, if I include a permalink to a code fragment in this repo:

String.format = function(string) {

and you try replying to this, you'll see a large chunk of HTML which GitHub expanded itself. ... Hrm weird, that didn't reproduce it, but I saw it when replying to this.

As you can see above, I just fixed the issue where it wouldn't recognize GitHub code snippets.
You can install the new version here: https://github.com/jerone/UserScripts/tree/master/Github_Reply_Comments or wait for the external sites (Greasy Fork & OpenUserJS) to synchronize.

Thanks for reporting, it was an interesting issue 😄

@aspiers
Copy link
Author

aspiers commented Feb 3, 2019

Fantastic work, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants