Commit 4b5c7c4231

4b5c7c4231abd09204bbb386a61e7f1d78e07c3c

parent: 481c39f230

Unsigned

cmc <hello@cleberg.net> · 2026-03-30 22:20 UTC

Fix nonisolated table alignment lookup in Readme View

Layout: unified · split

Hutch.xcodeproj/project.pbxproj +40 −14
@@ -10,7 +10,11 @@
1010 8B2F89662F69DEB900FC0253 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 8B2F89632F69DEB900FC0253 /* LICENSE */; };
1111 8B2F89672F69DEB900FC0253 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 8B2F89642F69DEB900FC0253 /* README.md */; };
1212 8B2F89682F69DEB900FC0253 /* SECURITY.md in Resources */ = {isa = PBXBuildFile; fileRef = 8B2F89652F69DEB900FC0253 /* SECURITY.md */; };
13 8BE082012F80000100000001 /* HutchWidgetExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 8BE081F62F80000100000001 /* HutchWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
13 8BE082012F80000100000001 /* HutchWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 8BE081F62F80000100000001 /* HutchWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
14 8BE09E7F2F7B2CC300F88693 /* storebutton.svg in Resources */ = {isa = PBXBuildFile; fileRef = 8BE09E7C2F7B2CC300F88693 /* storebutton.svg */; };
15 8BE09E802F7B2CC300F88693 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 8BE09E7A2F7B2CC300F88693 /* index.html */; };
16 8BE09E812F7B2CC300F88693 /* styles.css in Resources */ = {isa = PBXBuildFile; fileRef = 8BE09E7D2F7B2CC300F88693 /* styles.css */; };
17 8BE09E822F7B2CC300F88693 /* privacy.html in Resources */ = {isa = PBXBuildFile; fileRef = 8BE09E7B2F7B2CC300F88693 /* privacy.html */; };
1418 8BF100032F9A000100000001 /* Markdown in Frameworks */ = {isa = PBXBuildFile; productRef = 8BF100022F9A000100000001 /* Markdown */; };
1519/* End PBXBuildFile section */
1620
@@ -32,15 +36,15 @@
3236/* End PBXContainerItemProxy section */
3337
3438/* Begin PBXCopyFilesBuildPhase section */
35 8BE081FA2F80000100000001 /* Embed App Extensions */ = {
39 8BE081FA2F80000100000001 /* Embed Foundation Extensions */ = {
3640 isa = PBXCopyFilesBuildPhase;
3741 buildActionMask = 2147483647;
3842 dstPath = "";
3943 dstSubfolderSpec = 13;
4044 files = (
41 8BE082012F80000100000001 /* HutchWidgetExtension.appex in Embed App Extensions */,
45 8BE082012F80000100000001 /* HutchWidgetExtension.appex in Embed Foundation Extensions */,
4246 );
43 name = "Embed App Extensions";
47 name = "Embed Foundation Extensions";
4448 runOnlyForDeploymentPostprocessing = 0;
4549 };
4650/* End PBXCopyFilesBuildPhase section */
@@ -54,6 +58,10 @@
5458 8B8182C22F6B742B000AE049 /* HutchTests */ = {isa = PBXFileReference; lastKnownFileType = folder; path = HutchTests; sourceTree = "<group>"; };
5559 8BDCA5272F6B76B20066AA29 /* HutchTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = HutchTests.xctestplan; sourceTree = "<group>"; };
5660 8BE081F62F80000100000001 /* HutchWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = HutchWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
61 8BE09E7A2F7B2CC300F88693 /* index.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = index.html; sourceTree = "<group>"; };
62 8BE09E7B2F7B2CC300F88693 /* privacy.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = privacy.html; sourceTree = "<group>"; };
63 8BE09E7C2F7B2CC300F88693 /* storebutton.svg */ = {isa = PBXFileReference; lastKnownFileType = text; path = storebutton.svg; sourceTree = "<group>"; };
64 8BE09E7D2F7B2CC300F88693 /* styles.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = styles.css; sourceTree = "<group>"; };
5765/* End PBXFileReference section */
5866
5967/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
@@ -131,6 +139,7 @@
131139 8B4B28C82F6704280045FA19 = {
132140 isa = PBXGroup;
133141 children = (
142 8BE09E7E2F7B2CC300F88693 /* website */,
134143 8BDCA5272F6B76B20066AA29 /* HutchTests.xctestplan */,
135144 8B8182C22F6B742B000AE049 /* HutchTests */,
136145 8B2F89632F69DEB900FC0253 /* LICENSE */,
@@ -154,6 +163,17 @@
154163 name = Products;
155164 sourceTree = "<group>";
156165 };
166 8BE09E7E2F7B2CC300F88693 /* website */ = {
167 isa = PBXGroup;
168 children = (
169 8BE09E7A2F7B2CC300F88693 /* index.html */,
170 8BE09E7B2F7B2CC300F88693 /* privacy.html */,
171 8BE09E7C2F7B2CC300F88693 /* storebutton.svg */,
172 8BE09E7D2F7B2CC300F88693 /* styles.css */,
173 );
174 path = website;
175 sourceTree = "<group>";
176 };
157177/* End PBXGroup section */
158178
159179/* Begin PBXNativeTarget section */
@@ -164,7 +184,7 @@
164184 8B4B28CD2F6704280045FA19 /* Sources */,
165185 8B4B28CE2F6704280045FA19 /* Frameworks */,
166186 8B4B28CF2F6704280045FA19 /* Resources */,
167 8BE081FA2F80000100000001 /* Embed App Extensions */,
187 8BE081FA2F80000100000001 /* Embed Foundation Extensions */,
168188 );
169189 buildRules = (
170190 );
@@ -237,7 +257,7 @@
237257 attributes = {
238258 BuildIndependentTargetsInParallel = 1;
239259 LastSwiftUpdateCheck = 2630;
240 LastUpgradeCheck = 2630;
260 LastUpgradeCheck = 2640;
241261 TargetAttributes = {
242262 8B4B28D02F6704280045FA19 = {
243263 CreatedOnToolsVersion = 26.3;
@@ -280,6 +300,10 @@
280300 8B2F89662F69DEB900FC0253 /* LICENSE in Resources */,
281301 8B2F89672F69DEB900FC0253 /* README.md in Resources */,
282302 8B2F89682F69DEB900FC0253 /* SECURITY.md in Resources */,
303 8BE09E7F2F7B2CC300F88693 /* storebutton.svg in Resources */,
304 8BE09E802F7B2CC300F88693 /* index.html in Resources */,
305 8BE09E812F7B2CC300F88693 /* styles.css in Resources */,
306 8BE09E822F7B2CC300F88693 /* privacy.html in Resources */,
283307 );
284308 runOnlyForDeploymentPostprocessing = 0;
285309 };
@@ -396,6 +420,7 @@
396420 MTL_FAST_MATH = YES;
397421 ONLY_ACTIVE_ARCH = YES;
398422 SDKROOT = iphoneos;
423 STRING_CATALOG_GENERATE_SYMBOLS = YES;
399424 SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
400425 SWIFT_OPTIMIZATION_LEVEL = "-Onone";
401426 };
@@ -453,6 +478,7 @@
453478 MTL_ENABLE_DEBUG_INFO = NO;
454479 MTL_FAST_MATH = YES;
455480 SDKROOT = iphoneos;
481 STRING_CATALOG_GENERATE_SYMBOLS = YES;
456482 SWIFT_COMPILATION_MODE = wholemodule;
457483 VALIDATE_PRODUCT = YES;
458484 };
@@ -465,7 +491,7 @@
465491 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
466492 CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements;
467493 CODE_SIGN_STYLE = Automatic;
468 CURRENT_PROJECT_VERSION = 13;
494 CURRENT_PROJECT_VERSION = 14;
469495 DEVELOPMENT_TEAM = ZCNAX3VL9D;
470496 ENABLE_PREVIEWS = YES;
471497 GENERATE_INFOPLIST_FILE = YES;
@@ -482,7 +508,7 @@
482508 "$(inherited)",
483509 "@executable_path/Frameworks",
484510 );
485 MARKETING_VERSION = 2.5.1;
511 MARKETING_VERSION = 2.5.2;
486512 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch;
487513 PRODUCT_NAME = "$(TARGET_NAME)";
488514 STRING_CATALOG_GENERATE_SYMBOLS = YES;
@@ -502,7 +528,7 @@
502528 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
503529 CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements;
504530 CODE_SIGN_STYLE = Automatic;
505 CURRENT_PROJECT_VERSION = 13;
531 CURRENT_PROJECT_VERSION = 14;
506532 DEVELOPMENT_TEAM = ZCNAX3VL9D;
507533 ENABLE_PREVIEWS = YES;
508534 GENERATE_INFOPLIST_FILE = YES;
@@ -519,7 +545,7 @@
519545 "$(inherited)",
520546 "@executable_path/Frameworks",
521547 );
522 MARKETING_VERSION = 2.5.1;
548 MARKETING_VERSION = 2.5.2;
523549 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch;
524550 PRODUCT_NAME = "$(TARGET_NAME)";
525551 STRING_CATALOG_GENERATE_SYMBOLS = YES;
@@ -582,7 +608,7 @@
582608 APPLICATION_EXTENSION_API_ONLY = YES;
583609 CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements;
584610 CODE_SIGN_STYLE = Automatic;
585 CURRENT_PROJECT_VERSION = 13;
611 CURRENT_PROJECT_VERSION = 14;
586612 DEVELOPMENT_TEAM = ZCNAX3VL9D;
587613 GENERATE_INFOPLIST_FILE = NO;
588614 INFOPLIST_FILE = HutchWidgetExtension/Info.plist;
@@ -592,7 +618,7 @@
592618 "@executable_path/Frameworks",
593619 "@executable_path/../../Frameworks",
594620 );
595 MARKETING_VERSION = 2.5.1;
621 MARKETING_VERSION = 2.5.2;
596622 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension;
597623 PRODUCT_NAME = "$(TARGET_NAME)";
598624 SKIP_INSTALL = YES;
@@ -611,7 +637,7 @@
611637 APPLICATION_EXTENSION_API_ONLY = YES;
612638 CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements;
613639 CODE_SIGN_STYLE = Automatic;
614 CURRENT_PROJECT_VERSION = 13;
640 CURRENT_PROJECT_VERSION = 14;
615641 DEVELOPMENT_TEAM = ZCNAX3VL9D;
616642 GENERATE_INFOPLIST_FILE = NO;
617643 INFOPLIST_FILE = HutchWidgetExtension/Info.plist;
@@ -621,7 +647,7 @@
621647 "@executable_path/Frameworks",
622648 "@executable_path/../../Frameworks",
623649 );
624 MARKETING_VERSION = 2.5.1;
650 MARKETING_VERSION = 2.5.2;
625651 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension;
626652 PRODUCT_NAME = "$(TARGET_NAME)";
627653 SKIP_INSTALL = YES;
Hutch.xcodeproj/xcshareddata/xcschemes/Hutch.xcscheme +1 −1
@@ -1,6 +1,6 @@
11<?xml version="1.0" encoding="UTF-8"?>
22<Scheme
3 LastUpgradeVersion = "2630"
3 LastUpgradeVersion = "2640"
44 version = "1.7">
55 <BuildAction
66 parallelizeBuildables = "YES"
Hutch.xcodeproj/xcshareddata/xcschemes/HutchTests.xcscheme +1 −1
@@ -1,6 +1,6 @@
11<?xml version="1.0" encoding="UTF-8"?>
22<Scheme
3 LastUpgradeVersion = "2630"
3 LastUpgradeVersion = "2640"
44 version = "1.7">
55 <BuildAction
66 parallelizeBuildables = "YES"
Hutch/Views/Repositories/ReadmeView.swift +7 −2
@@ -1001,7 +1001,7 @@ nonisolated private func renderHTMLTable(
10011001 if hasHeaderSeparator {
10021002 html += "<thead><tr>"
10031003 for (index, cell) in headerRow.enumerated() {
1004 html += "<th" + tableAlignmentStyleAttribute(columnAlignments[safe: index] ?? nil) + ">" + inlineRenderer(cell) + "</th>"
1004 html += "<th" + tableAlignmentStyleAttribute(columnAlignment(at: index, in: columnAlignments)) + ">" + inlineRenderer(cell) + "</th>"
10051005 }
10061006 html += "</tr></thead>\n"
10071007 }
@@ -1010,7 +1010,7 @@ nonisolated private func renderHTMLTable(
10101010 for row in bodyRows {
10111011 html += "<tr>"
10121012 for (index, cell) in row.enumerated() {
1013 html += "<td" + tableAlignmentStyleAttribute(columnAlignments[safe: index] ?? nil) + ">" + inlineRenderer(cell) + "</td>"
1013 html += "<td" + tableAlignmentStyleAttribute(columnAlignment(at: index, in: columnAlignments)) + ">" + inlineRenderer(cell) + "</td>"
10141014 }
10151015 html += "</tr>\n"
10161016 }
@@ -1019,6 +1019,11 @@ nonisolated private func renderHTMLTable(
10191019 return html
10201020}
10211021
1022nonisolated private func columnAlignment(at index: Int, in alignments: [String?]) -> String? {
1023 guard alignments.indices.contains(index) else { return nil }
1024 return alignments[index]
1025}
1026
10221027nonisolated private func tableAlignmentStyleAttribute(_ alignment: String?) -> String {
10231028 guard let alignment, !alignment.isEmpty else { return "" }
10241029 return #" style="text-align: \#(alignment);""#