Page MenuHomePhorge

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

Authored by valerio.bozzolan on Mar 25 2024, 07:41.
Tags
None
Referenced Files
F4116267: D25560.1746963074.diff
Sat, May 10, 11:31
F4069025: D25560.1746822806.diff
Thu, May 8, 20:33
F4053913: D25560.1746772800.diff
Thu, May 8, 06:40
F4042729: D25560.1746725600.diff
Wed, May 7, 17:33
F4037075: D25560.1746720441.diff
Wed, May 7, 16:07
F4036505: D25560.1746717625.diff
Wed, May 7, 15:20
F4036504: D25560.1746717624.diff
Wed, May 7, 15:20
F4036503: D25560.1746717623.diff
Wed, May 7, 15:20

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
Branch
remarkup-lang-guess-from-name
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1122
Build 1122: arc lint + arc unit

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