Skip to content

The episode of Who's the Boss where Tony "checks for needed escape characters." #2

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

Merged
merged 6 commits into from
May 20, 2014
Merged
Changes from 1 commit
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
Prev Previous commit
acounts for special character at end of string
  • Loading branch information
BRONSOLO committed May 19, 2014
commit cb77cef9fdc6ac2bf2c25338200d01a34a26e367
10 changes: 5 additions & 5 deletions plotly/plotly_aux/check_escape.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
%adds '\' escape character if needed
ec = '\';
ind = find( (val == '"') | (val == '\' ));
val = [val ec(ones(1,length(ind)-1))]; %extend lengh of val to prep for char shifts.
if(ind)
if(ind(1) == 1)
val = ['\' val];
ind = ind + 1;
ind(1) = [];
ind = ind + 1;
ind(1) = [];
end
if (ind)
val = [val ec(ones(1,length(ind)))]; %extend lengh of val to prep for char shifts.
for i = 1:length(ind)
val(ind(i):end) = [ec val(ind(i):end-1)];
ind = ind+1;
val(ind(i):end) = [ec val(ind(i):end-1)];
ind = ind+1;
end
end
end
Expand Down