<commit_before>﻿' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Immutable
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.VisualBasic.Utilities
    Partial Friend Class ImportsOrganizer
        Private Shared ReadOnly s_newLine As SyntaxTrivia = SyntaxFactory.ElasticCarriageReturnLineFeed

        Public Shared Function Organize([imports] As SyntaxList(Of ImportsStatementSyntax),
                                        placeSystemNamespaceFirst As Boolean,
                                        separateGroups As Boolean) As SyntaxList(Of ImportsStatementSyntax)

            [imports] = OrganizeWorker([imports], placeSystemNamespaceFirst)

            If separateGroups Then
                For i = 1 To [imports].Count - 1<commit_msg>Change the Imports organizer to not use ElasticTrivia for the NewLine<commit_after>﻿' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Immutable
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.VisualBasic.Utilities
    Partial Friend Class ImportsOrganizer
        Private Shared ReadOnly s_newLine As SyntaxTrivia = SyntaxFactory.CarriageReturnLineFeed

        Public Shared Function Organize([imports] As SyntaxList(Of ImportsStatementSyntax),
                                        placeSystemNamespaceFirst As Boolean,
                                        separateGroups As Boolean) As SyntaxList(Of ImportsStatementSyntax)

            [imports] = OrganizeWorker([imports], placeSystemNamespaceFirst)

            If separateGroups Then
                For i = 1 To [imports].Count - 1
{'fraction_non_alphanumeric': 0.04925602873268343, 'fraction_numerical': 0.004104669061056952, 'mean_word_length': 2.9877300613496933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4230071', 'n_tokens_mistral': 454, 'n_tokens_neox': 438, 'n_words': 149}