# Does README.md have max characters?

In my repo (https://github.com/halfrost/LeetCode-Go) README doesn’t render complete.

The last line is incomplete:

You can see this problem in this commit: https://github.com/halfrost/LeetCode-Go/tree/7989003450a23bf1c27a34201f124cb2745d7096, the last line of README.md.

In my local, it looks correct.

``````
| Title | Solution | Difficulty | Time | Space | 收藏 |
| ----- | :--------: | :----------: | :----: | :-----: |:-----: |
|[973. K Closest Points to Origin](https://leetcode.com/problems/k-closest-points-to-origin/)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0973.K-Closest-Points-to-Origin)| Medium | O(n log n)| O(log n) ||
|[976. Largest Perimeter Triangle](https://leetcode.com/problems/largest-perimeter-triangle/)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0976.Largest-Perimeter-Triangle)| Easy | O(n log n)| O(log n) ||
|[1030. Matrix Cells in Distance Order](https://leetcode.com/problems/matrix-cells-in-distance-order/)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1030.Matrix-Cells-in-Distance-Order)| Easy | O(n^2)| O(1) ||
|[1054. Distant Barcodes](https://leetcode.com/problems/distant-barcodes/)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1054.Distant-Barcodes)| Medium | O(n log n)| O(log n) |❤️|

``````

This file has no grammatical errors, but GitHub can not render it complete.

Does this README.md trigger max characters? Why GitHub renders it incomplete? It’s a bug or not?

In my local, it looks correct:

Hey @halfrost o/

That is strange, and I wish I could say I have a substantial answer for you straight away, but I don’t =(

I’ve scoured each our docs, internal ticket history, slack history, and even our own codebase. I’ve been unable to find any documented (or coded) character limits on markdown files; `README` or otherwise.

I have seen some internal comments that suggest, no; we do not have a character limit. But because of the experience you see, there very well may be a limit. Since I’ve spent some time on this, I’m hesitant to keep digging before hearing from you.

Since that README is so extensive, should we discuss the usability of the page? Is there functionality elsewhere that makes navigating such a large page easy for your users?

While I can definitely go back here and ping some folks, I would wonder why we’re not breaking these segments into their own files, or even into gists, to store that information. Rather than having it all live in the README.

I can assume that just having that bit of knowledge as an official stance is valuable, but perhaps it may be best in your case to consider organizing the information in another way.

Do please let me know what you think, and if any other users have run into this, curious to hear what people think and if I need to go hunt down that person potentially responsible for this unforeseen limit/bug.

Cheers

2 Likes

Hi, @nethgato

Thanks for your reply. I try some solutions which contain different words in the README. I am sure this behavior, trimming some characters, is made by Github render.

However, I support your opinions. If README is too long, this is really unfriendly to the readers. I have split it into different parts. In the latest commit, everything is fine.

Finally, thank you for patiently answering this strange question of mine. Maybe I waste your time.

Hey @halfrost – absolutely not a waste of time! Thank you for replying back and being willing to rethink your approach to the layout of your README.

It really would be great to have an official answer, but it was rather difficult to track down. I had hoped to avoid pinging too many folks in an attempt to find that answer. If there’s any more interest in finding it, I can re-engage with folks that may know better than myself. Surprisingly, it was more difficult than I thought it would be =D

1 Like

Hey @nethgato ,

I also run into some kind of README limitation as well. But it only seems to apply for the Readme displayed on the main repo page, and not if you open the same file directly. The readme rendering here is cut off: GitHub - ml-tooling/best-of-ml-python at 2020.12.27 while the rendering here for the same file is fine: best-of-ml-python/README.md at 2020.12.27 · ml-tooling/best-of-ml-python · GitHub . I did a few experiments and figured out that the limitation seems to be around 500k characters. However, this might be just a coincidence and maybe there is just a rendering timeout for the main repo page.

Update: I think I figured out the limit. The readme on the main page only renders the first 512 KB of the README.md file. This is around 500k characters (+/- a few thousand).

Here is another example with just using lorem ipsum text: The text on the main repo page is cut off