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


(Discourse.PRO) #1

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:
  1. or splitted:

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.


(Kane York) #2

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”).


(Discourse.PRO) #3

I have implemented it as a plugin: GitHub - discourse-pro/df-github-blob-onebox: The plugin removes the limitation for the maximum number of code lines of the standard GitHub Blob Onebox for the Discourse forum software
A usage example: How does \Magento\Sales\Model\Order\CustomerManagement::create() work? - Magento 2