When I try to embed gist in Medium it shows only the first 11 lines of the gist while code is longer inside gist. How can be this fixed?
4 Answers
Medium have said in their Twitter support feed that it's an issue that only affects the editor but it should look fine when published:
Hi Ayush! This is a known issue that only affects the editor. The gists will be displayed properly once the post is published. Sorry for the trouble!

- 127,765
- 105
- 273
- 257

- 456
- 5
- 4
-
3Great answer! By the way, I was able to verify this solution in Medium by going to my story's settings menu, then clicking on "Share Draft Link" to get the link to the draft version, as it would appear if published. In a different browser window (incognito/privacy) where you are *not* already logged in to Medium, visit that link. You should see the full code gist, rather than the truncated one. – Alvin S. Lee Jan 02 '20 at 08:37
-
2Oof My god, they still haven't fixed it. Spent so much time trying to make it work. So frustrating. – praneeth kandula Feb 06 '20 at 02:47
-
Tried to use gist, but couldn't use it because all i could see was the script tag, It's funny how some of the publishers can really use gist but few can't maybe it's the formatting i am not really sure about this any guess? – Bug Hunter Zoro Mar 01 '20 at 20:06
-
2It's April and it's still not fixed!! – Krzysztof Grzybek Apr 05 '20 at 07:55
-
I can't read certain content on Medium - code examples, and other referenced content. At other times, there is a big gap before a graphical element. I've tried different browsers, but the key content is always missing. I'd hate to have subscribed for that! – DrWhat Jul 30 '21 at 11:12
To embed a Tweet, Instagram video, or more on Medium, all you need to do is to paste the URL into the Medium editor, and press Enter to convert that link into an embed.
As per the medium guide, you just have to paste the gist embed URL into the Medium editor (without the script tag), and press Enter. It'll convert into an embed code segment on the editor itself.

- 161
- 2
- 3
-
This is what really solved my problem. I kept including the script tag like an idiot, he he :P – Jay Apr 09 '22 at 06:07
I had similar problem while working on my first blog. But following solution helped me. Clone gist via HTTPS. Copy link and paste in editor(no embed, just normal line). Press enter. Pressing enter is important. You will see your code once you hit enter.

- 186
- 2
- 3
You can just ignore it and complete the blog. During the blog edit, it will not show full source code but it will show the full source code once published.
It is a known issue of medium.

- 7,944
- 5
- 56
- 56