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
@@ -197,7 +199,7 @@ public struct LaTeX: View {
197199 else {
198200 // The view is not rendered nor cached
199201 switch renderingStyle {
200- case . empty, . original, . progress:
202+ case . empty, . original, . redactedOriginal , . progress:
201203 // Render the components asynchronously
202204 loadingView ( ) . task {
203205 await renderAsync ( )
@@ -309,6 +311,12 @@ extension LaTeX {
309311 Text ( " " )
310312 case . original:
311313 Text ( latex)
314+ case . redactedOriginal:
315+ Text ( latex)
316+ . foregroundStyle ( Color . clear)
317+ . background {
318+ Text ( latex) . redacted ( reason: . placeholder)
319+ }
312320 case . progress:
313321 ProgressView ( )
314322 default :
You can’t perform that action at this time.
0 commit comments