Skip to content

Commit

Permalink
#94 Removed option to wrap referenced keys in square brackets.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianludwig committed Oct 10, 2015
1 parent 2396768 commit 327c37c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -37,7 +37,7 @@ Whitepace in this file is mostly ignored. If you absolutely need to put spaces a

### References

If you want a key to inherit the values of another key, you can use a reference. Any property not specified for a key will be taken from the reference. References may optionally be enclosed by square brackets like the keys the reference.
If you want a key to inherit the values of another key, you can use a reference. Any property not specified for a key will be taken from the reference.

### Example

Expand Down
8 changes: 1 addition & 7 deletions lib/twine/stringsfile.rb
Expand Up @@ -85,11 +85,6 @@ def match_key(text)
return match[1] if match
end

def match_reference(text)
match = /^\[?(.+?)\]?$/.match(text)
return match[1] if match
end

public

def initialize
Expand Down Expand Up @@ -169,8 +164,7 @@ def read(path)
when 'tags'
current_row.tags = value.split(',')
when 'ref'
key = match_reference(value)
current_row.reference_key = key if key
current_row.reference_key = value if value
else
if !@language_codes.include? key
add_language_code(key)
Expand Down

0 comments on commit 327c37c

Please sign in to comment.