Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 49649a4

Browse filesBrowse files
oleavrcodebytere
authored andcommitted
tools: fix config serialization w/ long strings
So that “config.gypi” gets serialized correctly in cases such as: ./configure --v8-options='--write-protect-code-memory \ --wasm-write-protect-code-memory' Where “v8_options” gets prettyprinted into a multiline string. PR-URL: #35982 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent a81dc9a commit 49649a4
Copy full SHA for 49649a4

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎tools/js2c.py‎

Copy file name to clipboardExpand all lines: tools/js2c.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ def handle_config_gypi(config_filename):
163163
def jsonify(config):
164164
# 1. string comments
165165
config = re.sub(r'#.*?\n', '', config)
166+
# 2. join multiline strings
167+
config = re.sub(r"'$\s+'", '', config, flags=re.M)
166168
# 3. normalize string literals from ' into "
167169
config = re.sub('\'', '"', config)
168-
# 2. turn pseudo-booleans strings into Booleans
170+
# 4. turn pseudo-booleans strings into Booleans
169171
config = re.sub('"true"', 'true', config)
170172
config = re.sub('"false"', 'false', config)
171173
return config

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.