Page MenuHomePhorge

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

Authored by valerio.bozzolan on Mar 25 2024, 07:41.
Tags
None
Referenced Files
F3390943: D25560.1744473834.diff
Fri, Apr 11, 16:03
F3390703: D25560.1744470830.diff
Fri, Apr 11, 15:13
F3375293: D25560.1744305591.diff
Wed, Apr 9, 17:19
F3369957: D25560.1744217054.diff
Tue, Apr 8, 16:44
F3369813: D25560.1744216535.diff
Tue, Apr 8, 16:35
F3361957: D25560.1744057329.diff
Sun, Apr 6, 20:22
F3360173: D25560.1743976876.diff
Sat, Apr 5, 22:01
F3348542: D25560.1743739626.diff
Thu, Apr 3, 04:07

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