Need to make customizable the GitHub onebox number of lines limitation instead of the current 20

For example, the following method contains 22 lines of code, and it is impossible to publish it in a useful way.
It is only possible to publish it as…

  1. chopped:

https://github.com/magento/magento2/blob/052e789/app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo/Collection.php#L58-L80

  1. or splitted:

https://github.com/magento/magento2/blob/052e789/app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo/Collection.php#L58-L72

https://github.com/magento/magento2/blob/052e789/app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo/Collection.php#L73-L80

It would be nice to let the forum’s administrator to decide what should be the number of lines limitation instead of the currently 20.

Meh, if you need to share that much code copy it into a backtick-fenced block and link to the source on the next line (with a onebox breaker, such as “Source: link”).

2 Likes

I have implemented it as a plugin: https://github.com/mage2pro/df-github-blob-onebox
A usage example: https://mage2.pro/t/1968