vkiryukhin / vkBeautify

vkBeautify is a small, simple and powerfull javascript plugin to beautify XML, JSON, CSS and SQL text.
http://www.eslinstructor.net/vkbeautify/
Other
318 stars 98 forks source link

Added return to separate multiple SQL statements #17

Open enricoberti opened 8 years ago

enricoberti commented 8 years ago

Hi! I think this is useful when formatting more than one statement at once

enricoberti commented 8 years ago

And this also takes in account the SQL comments

Andis59 commented 7 years ago

It doesn't take comments consideration! It makes a new line after comma, which lead to the the rest of the comment is taken for code!

I have updated vkbeautify.js with the changes that you have made in this PR // Anders

e.g

/*
This is a test for new line, after comma in a comment */

select * from Foo; -- this is also a comment, and now ...

AFTER running vkBeautify.sql

/* This is a test for new line,
         after comma IN a comment */SELECT *
FROM Foo;

 -- this is also a comment,
        AND now ...