MightyCreak / mesamatrix

PHP script that parse the text file from the mesa git tree and format it in HTML.
https://mesamatrix.net
GNU Affero General Public License v3.0
125 stars 27 forks source link

Only include the first line of the commit messages #158

Open vanillajonathan opened 4 years ago

vanillajonathan commented 4 years ago

Only include the first line commit messages to prevent horizontal scrolling.

Example of a commit with a long message: https://gitlab.freedesktop.org/mesa/mesa/commit/84e707e6f2292dd886b8385fab0ced5122e35876

docs/features: Update virgl OpenGL 4.5 features

GL_ARB_clip_control and GL_KHR_robustness are now expose in the guest.

Mesamatrix displays this as:

"docs/features: Update virgl OpenGL 4.5 features GL_ARB_clip_control and GL_KHR_robustness are now expose in the guest."

Also of interest is to investigate the text-overflow CSS property.

MightyCreak commented 4 years ago

Partially fixed with #159 and #160. But indeed it should only take the first line.

vanillajonathan commented 4 years ago

Maybe something like this:

$lines = explode("\n", $commit_message);
$subject = $lines[0];

Can also be written as:

$subject = explode("\n", $commit_message)[0];