Page MenuHomePhorge

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

Authored by valerio.bozzolan on Mar 25 2024, 07:41.
Tags
None
Referenced Files
F2935019: D25560.1737813815.diff
Fri, Jan 24, 14:03
F2903057: D25560.1737323049.diff
Sat, Jan 18, 21:44
F2903056: D25560.1737323048.diff
Sat, Jan 18, 21:44
F2902876: D25560.1737316641.diff
Sat, Jan 18, 19:57
F2902839: D25560.1737315031.diff
Sat, Jan 18, 19:30
F2901556: D25560.1737283301.diff
Sat, Jan 18, 10:41
F2899349: D25560.1737261575.diff
Sat, Jan 18, 04:39
F2899316: D25560.1737261373.diff
Sat, Jan 18, 04:36

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