Page MenuHomePhorge

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

Authored by valerio.bozzolan on Mar 25 2024, 07:41.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 10:48
Unknown Object (File)
Thu, Apr 25, 10:48
Unknown Object (File)
Wed, Apr 24, 22:24
Unknown Object (File)
Wed, Apr 24, 21:17
Unknown Object (File)
Wed, Apr 17, 18:26
Unknown Object (File)
Wed, Apr 17, 07:11
Unknown Object (File)
Fri, Apr 12, 03:47
Unknown Object (File)
Fri, Apr 12, 01:15

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