Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform to YAML spec where flow indicators can't be in shorthand tags #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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