TaoK / PoorMansTSqlFormatter

A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.
http://www.architectshack.com/PoorMansTSqlFormatter.ashx
GNU Affero General Public License v3.0
969 stars 268 forks source link

Bug with formatting when using double quote #200

Open RRamanaFTI opened 6 years ago

RRamanaFTI commented 6 years ago

When I use this tool and sometimes need to format a dynamic sql string like the one below:

'select ''.txt'' as fileExt'

and I try to format it wont format much as the whole string is quoted.. but when I remove the begin and end quote for the statement and try to format this below: select ''.txt'' as fileExt I get output SELECT ''.txt '' AS fileExt which introduces a subtle (but nasty for middle tier) with an extra space after .txt !!

could you please fix this bug and let me know when it is checked in

RRamanaFTI commented 6 years ago

submitted tool bug https://github.com/TaoK/PoorMansTSqlFormatter/issues/200