Skip to content

Commit fe8525f

Browse files
authored
Merge pull request #97 from johnnychen94/patch-2
docs: explain invalid style tags
2 parents 71f4a19 + 4c7eddc commit fe8525f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/src/basics/styled_text.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ If you just want to **use** `Term.jl`'s style functionality, just make sure to r
9595
The style tags used by `Term.jl` have an opening `"[style]"` and closing `"[/style]"` syntax. The style is applied to everything inbetween. For `"[/style]"` to close `"[style]"` the text in the parentheses must match exactly (excuding `/`), up to the number and position of spaces and the words order. So:
9696
```julia
9797
"[red] wohoo [/red]" # works
98-
"[red] wohoo [/red ]" # doesn't
98+
"[red] wohoo [/red ]" # doesn't -- no extra spaces
9999
"[bold blue] wohoo [/bold blue]" # works
100-
"[bold blue] wohoo [/blue bold]" # doesn't
100+
"[bold blue] wohoo [/blue bold]" # doesn't -- should match the first style tag "bold"
101+
"[bold blue] wohoo [/bold /blue]" # doesn't -- one single / only
101102
```
102103

103104
!!! tip

0 commit comments

Comments
 (0)