Skip to content

Commit

Permalink
Conform to YAML spec where flow indicators can't be in shorthand tags
Browse files Browse the repository at this point in the history
  • Loading branch information
qnighy committed Jun 15, 2020
1 parent 87e0887 commit 3845d36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions doc/tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Linter won't complain about `ja.desc`
-------------

It's similar to `!only`, but is stricter.
It can take comma-separated locales as a parameter just like `!only:en` or `!only:en,ja,zh-HK`, and ensures that a key only exists in files of the specified locales.
It can take comma-separated locales as a parameter just like `!only:en` or `!<only:en,ja,zh-HK>`, and ensures that a key only exists in files of the specified locales.

<table><thead><tr>
<th></th>
Expand Down Expand Up @@ -235,7 +235,7 @@ Linter will complain about `en.desc`, because the key is supposed to exist only
```yaml
en:
title: 'Non zero sum'
desc: !only:en,ja 'A situation in...'
desc: !<only:en,ja> 'A situation in...'
```

</td><td>
Expand All @@ -261,7 +261,7 @@ The key can exist in the specified locales `en,ja`
```yaml
en:
title: 'Non zero sum'
desc: !only:en,ja 'A situation in...'
desc: !<only:en,ja> 'A situation in...'
```

</td><td>
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/i18n_flow/validator/symmetry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@
ast_1 = parse_yaml(<<-YAML)['en']
en:
key_1: text_1
key_2: !only:en,ja text_2
key_2: !<only:en,ja> text_2
YAML
ast_2 = parse_yaml(<<-YAML)['ja']
ja:
key_1: text_1
key_2: !only:en,ja text_2
key_2: !<only:en,ja> text_2
YAML

allow(validator).to receive(:ast_1).and_return(ast_1)
Expand Down

0 comments on commit 3845d36

Please sign in to comment.