-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Update source to adhere to quote style guide. Fixes issue #1100. #1211
Conversation
Thanks for doing this! We're actually on vacation this week so will probably pick this up next week. However, one thing I noticed was that the CodeMirror submodule SHA is showing as a diff for some reason. Could you look into this? |
When I cloned the repo there was that an un-pushed commit already there, I must have included it in mine. |
.replace(/>/g, '>'); | ||
.replace(/&/g, "&") | ||
.replace(/"/g, """) | ||
.replace(/"/g, "'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Global find/replace error. The first parameter needs to stay the same:
.replace(/'/g, "'")
Jonathan, you'll need to sign the Contributor's License Agreement: http://dev.brackets.io/brackets-contributor-license-agreement.html |
@@ -141,7 +141,7 @@ define(function (require, exports, module) { | |||
//If this is a fully quoted value, return the whole | |||
//thing regardless of position | |||
if (attrValue.length > 1 && | |||
(startChar === "'" || startChar === '"') && | |||
(startChar === "'" || startChar === "\"") && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this case is a valid exception to the rule, so please back out this change.
I also signed the agreement. |
ref = domain + "." + ref unless ref =~ /\./ | ||
r = "<a href='##{ref}'>#{ref}</a>" if info["$ref"] | ||
elsif info["enum"] | ||
r = "( #{info["enum"].join " | "} )" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know ruby, but this appears to be nested double-quotes. Do they need to be escaped? Even if that's valid, the coding convention doc says to use single-quotes inside double quotes, so I think it's safest to keep this line of code as it was.
There are several other cases in the ruby code that this comment also applies to, so try to find and fix those also. When you're done I'll do another scan of the code. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know Ruby either, but the below should be right.
write "<section id='toc' class='domain'>", "<h1>Table of Contents</h1>" | ||
@in["domains"].each do |info| | ||
domain = info["domain"] | ||
write "<h3><a href='##{info['domain']}'>#{info['domain']}</a></h3>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line now has nested single-quotes. Restore to original code.
Looks good. Thanks! |
Update source to adhere to quote style guide. Fixes issue #1100.
Went through the source while I was watching a LoL stream and updated the source to follow the style guide on quotes.
I did not edit tests though.