Page MenuHomePhorge

Remarkup code blocks: guess language from "name="
ClosedPublic

Authored by valerio.bozzolan on Mar 25 2024, 07:41.
Tags
None
Referenced Files
F2197769: D25560.1716292062.diff
Mon, May 20, 11:47
F2197488: D25560.1716268185.diff
Mon, May 20, 05:09
F2197486: D25560.1716268158.diff
Mon, May 20, 05:09
Unknown Object (File)
Thu, May 16, 09:44
Unknown Object (File)
Thu, May 9, 07:08
Unknown Object (File)
Mon, May 6, 14:00
Unknown Object (File)
Fri, May 3, 21:34
Unknown Object (File)
Fri, May 3, 21:34

Details

Summary

The file name is a sufficient source of information, if available.

Closes T15729

Test Plan

The new unit test is green. Old unit tests are green.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avivey added inline comments.
src/infrastructure/markup/blockrule/PhutilRemarkupCodeBlockRule.php
157–159

Better move this into the if (empty($options['lang']))) block below.

src/infrastructure/markup/blockrule/PhutilRemarkupCodeBlockRule.php
157–159

(Premising that it was a feature - kind of waterfall attempt - since guessFilenameExtension() can return NULL)

This revision is now accepted and ready to land.Mar 26 2024, 10:19