Permalink
Browse files

-function rename

  • Loading branch information...
1 parent 5e1a88b commit ae6a8cceb2b1a1a819d364827dfdabc56985f1e5 @facelessuser committed Apr 7, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −1 .gitignore
  2. +0 −1 lib/file_strip/comments.py
  3. +2 −2 lib/file_strip/json.py
View
3 .gitignore
@@ -1 +1,2 @@
-*.pyc
+*.pyc
+*.DS_Store
View
1 lib/file_strip/comments.py
@@ -23,7 +23,6 @@
# Additional styles that use the same style as others
comment_map = {
"json": "c", # Comments are not officially in the JSON spec, but if you strip them, you can use them
- "trex": "c",
"cpp": "c"
}
View
4 lib/file_strip/json.py
@@ -8,7 +8,7 @@
import comments
-def strip_dangling_comments(text, save_newlines=False):
+def strip_dangling_commas(text, save_newlines=False):
regex = re.compile(
# ([1st group] dangling commas) | ([8th group] everything else)
r"""((,([\s\r\n]*)(\]))|(,([\s\r\n]*)(\})))|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|.[^,"']*)""",
@@ -42,4 +42,4 @@ def strip_comments(text, save_newlines):
def sanitize_json(text, save_newlines=False):
- return strip_dangling_comments(comments.strip_comments('json', text, save_newlines), save_newlines)
+ return strip_dangling_commas(comments.strip_comments('json', text, save_newlines), save_newlines)

0 comments on commit ae6a8cc

Please sign in to comment.