Exemplo n.º 1
0
    public static SourceMap Identity(string content, string fileName)
    {
        var sb = new StringBuilder();

        sb.Append("AAAA");
        var endsWithNL = SourceMapBuilder.EndsWithNewLine(content);
        var len        = content.Length - (endsWithNL ? 1 : 0);

        for (var i = 0; i < len; i++)
        {
            if (content[i] == '\n')
            {
                sb.Append(";AACA");
            }
        }
        if (endsWithNL)
        {
            sb.Append(';');
        }
        return(new(new() { fileName })
        {
            mappings = sb.ToString()
        });