File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ public struct LaTeX: View {
9494
9595 /// The view displays the input text until its finished rendering.
9696 case original
97-
97+
98+ case redactedOriginal
99+
98100 /// The view displays a progress view until its finished rendering.
99101 case progress
100102
@@ -188,7 +190,7 @@ public struct LaTeX: View {
188190 else {
189191 // The view is not rendered nor cached
190192 switch renderingStyle {
191- case . empty, . original, . progress:
193+ case . empty, . original, . redactedOriginal , . progress:
192194 // Render the components asynchronously
193195 loadingView ( ) . task {
194196 await renderAsync ( )
@@ -299,6 +301,12 @@ extension LaTeX {
299301 Text ( " " )
300302 case . original:
301303 Text ( latex)
304+ case . redactedOriginal:
305+ Text ( latex)
306+ . foregroundStyle ( Color . clear)
307+ . background {
308+ Text ( latex) . redacted ( reason: . placeholder)
309+ }
302310 case . progress:
303311 ProgressView ( )
304312 default :
You can’t perform that action at this time.
0 commit comments