Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Allow comments following strings in .strings files #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Lin/LNLocalizationCollection.m
Original file line number Diff line number Diff line change
@@ -101,7 +101,7 @@ - (void)reloadLocalizations
__block NSRange keyRange;
__block NSRange valueRange;

NSRegularExpression *regularExpression = [NSRegularExpression regularExpressionWithPattern:@"(\"(\\S+.*\\S+)\"|(\\S+.*\\S+))\\s*=\\s*\"(.*)\";$"
NSRegularExpression *regularExpression = [NSRegularExpression regularExpressionWithPattern:@"(\"(\\S+.*\\S+)\"|(\\S+.*\\S+))\\s*=\\s*\"(.*)\";(.*)$"
options:0
error:NULL];

@@ -115,7 +115,7 @@ - (void)reloadLocalizations
options:0
range:NSMakeRange(0, line.length)];

if (result.range.location != NSNotFound && result.numberOfRanges == 5) {
if (result.range.location != NSNotFound && result.numberOfRanges >= 5) {
entityRange = [result rangeAtIndex:0];
entityRange.location += lineOffset;