We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 380163a + 6e174fe commit f273426Copy full SHA for f273426
README.md
@@ -44,9 +44,9 @@ To preserve the comments from the source:
44
require 'parser/current'
45
require 'unparser'
46
47
-ast, comments = Unparser.parse_with_comments('your(ruby(code)) # with comments')
+ast, comments = Unparser.parser.parse_with_comments(Unparser.buffer('your(ruby(code)) # with comments'))
48
49
-Unparser.unparse(ast, comments) # => 'your(ruby(code)) # with comments'
+Unparser.unparse(ast, comments: comments) # => 'your(ruby(code)) # with comments'
50
```
51
52
Passing in manually constructed AST:
0 commit comments