如何从<pre> tag

时间:2017-03-08 14:29:51

标签: html asp.net

I want to place a text in

 <pre></pre> 

tags to keep text formatting. Everything is working fine but I cannot remove the first line indent. How to change this code to remove the first line indent

    @foreach (var m in Model.postModelList)
{
    <hr />
    <dl class="dl-vertical">
        <dt>
            @Html.DisplayFor(x => m.PostDate)
        </dt>

        <dd>
            @Html.DisplayFor(model => m.PostTitle )
        </dd>

        <dd><pre>
            @Html.ActionLink(m.PostContent, "DisplayFullPost","Post", new {Id = m.PostId }, null )
        </pre></dd>
    </dl>

}

1 个答案:

答案 0 :(得分:3)

怎么样

import pandas as pd
first = pd.Series([(442, 248), (442, 249), (442, 250), (442, 251), (442, 252), (442, 253), (442, 254), (442, 255), (442, 256), (442, 257), (442, 258), (442, 259), (442, 260), (442, 261)])
second = pd.Series([(96, 128, 144), (112, 128, 144), (80, 96, 96), (32, 48, 48), (64, 64, 64), (64, 64, 64), (32, 32, 32), (16, 16, 16), (16, 16, 16), (16, 16, 16), (16, 16, 0), (16, 16, 16), (32, 32, 32)])

third = [(16, 16, 16), (32, 32, 32)] 

res = [ [item] + first[ second[ second == item].index ].tolist() for item in third]

[[(16, 16, 16), (442, 255), (442, 256), (442, 257), (442, 259)], [(32, 32, 32), (442, 254), (442, 260)]]

它从字面上理解来源的换行符和缩进字。