Skip to content

Commit 5f87084

Browse files
committed
Wrap Access and Modifiers columns in <code> tags
Add CodeWrapArrow helper that wraps values in <code> tags, handling the "old → new" arrow format as <code>old</code> → <code>new</code>. Applied to Access and Modifiers columns in the semantic changes detail table (HTML report only; semantic changes are excluded from MD report). Updated all sample base64 blocks. https://claude.ai/code/session_01HnKMFA576NFwa2RzB8vCqE
1 parent 91fa0cf commit 5f87084

3 files changed

Lines changed: 21 additions & 8 deletions

File tree

Services/HtmlReport/HtmlReportGenerateService.Helpers.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,19 @@ private static string ImportanceToMarker(ChangeImportance importance)
224224
_ => ""
225225
};
226226

227+
/// <summary>
228+
/// Wraps a value in <c>&lt;code&gt;</c> tags. If the value contains " → ", each side is wrapped individually.
229+
/// 値を &lt;code&gt; タグで囲みます。" → " を含む場合は両側を個別に囲みます。
230+
/// </summary>
231+
private static string CodeWrapArrow(string raw)
232+
{
233+
if (string.IsNullOrEmpty(raw)) return "";
234+
int idx = raw.IndexOf(" → ", StringComparison.Ordinal);
235+
if (idx >= 0)
236+
return $"<code>{HtmlEncode(raw[..idx])}</code> → <code>{HtmlEncode(raw[(idx + 3)..])}</code>";
237+
return $"<code>{HtmlEncode(raw)}</code>";
238+
}
239+
227240
/// <summary>
228241
/// Returns the display order for Unchanged files: SHA256Match → ILMatch → TextMatch.
229242
/// Unchanged ファイルの表示順序を返します: SHA256Match → ILMatch → TextMatch。

Services/HtmlReport/HtmlReportGenerateService.Sections.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ private void AppendAssemblySemanticChangesRow(
435435
string baseTypeTd = !isCont ? HtmlEncode(e.BaseType) : "";
436436
prevType = e.TypeName;
437437
string trOpen = isCont ? "<tr class=\"group-cont\">" : "<tr>";
438-
string accessTd = HtmlEncode(e.Access);
439-
string modifiersTd = HtmlEncode(e.Modifiers);
438+
string accessTd = CodeWrapArrow(e.Access);
439+
string modifiersTd = CodeWrapArrow(e.Modifiers);
440440
string bodyTd = e.Body.Length > 0 ? $"<code>{HtmlEncode(e.Body)}</code>" : "";
441441
string cbId = $"sc_{sectionPrefix}_{idx}_{scRowIdx}";
442442
string changeMarker = ChangeToMarker(e.Change);

0 commit comments

Comments
 (0)