PoorMansTSqlFormatter
PoorMansTSqlFormatter copied to clipboard
[noformat][/noformat] block adds a linefeed before [/noformat] everytime the document is formatted
When formatting a dockument in SSMS a new line and spacing is inserted before the [/noformat] tag. This is done every time the document is formatted resulting in more and more empty lines above the [/noformat] tag: Original query:
IF @Ref IS NULL
BEGIN
IF @DebugMsg = 'x1'
BEGIN
--[noformat]
PRINT 'Some debug info'
--[/noformat]
END
--[noformat]
SELECT something from table
--[/noformat]
END;
Formatted once:
IF @Ref IS NULL
BEGIN
IF @DebugMsg = 'x1'
BEGIN
--[noformat]
PRINT 'Some debug info'
--[/noformat]
END
--[noformat]
SELECT something from table
--[/noformat]
END;
Formatted twice:
IF @Ref IS NULL
BEGIN
IF @DebugMsg = 'x1'
BEGIN
--[noformat]
PRINT 'Some debug info'
--[/noformat]
END
--[noformat]
SELECT something from table
--[/noformat]
END;