Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[noformat][/noformat] block adds a linefeed before [/noformat] everytime the document is formatted #292

Open
mc-Jeeves opened this issue May 22, 2024 · 0 comments

Comments

@mc-Jeeves
Copy link

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;
@mc-Jeeves mc-Jeeves changed the title [noformat][/noformat] blok adds a linefeed before [/noformat] everytime the document is formatted [noformat][/noformat] block adds a linefeed before [/noformat] everytime the document is formatted May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant