无法在LESS中提取正确的值

时间:2016-03-21 19:15:06

标签: css less

我有以下

$ ls -l /proc/21860/fd |grep 22
lrwx------. 1 mathieu mathieu 64 Mar 21 19:55 22 -> socket:[187093]
$ lsof |grep 187093
python    21860       mathieu   22u     IPv4             187093       0t0        TCP localhost.localdomain:36072->localhost.localdomain:48908 (CLOSE_WAIT)

我的循环如下

def send(socket, data):
    sent = socket.send(data)
    while sent != len(data):
        data = data[sent:]
        sent = socket.send(data)

我得到的输出是(本例仅显示一个)

@ext-colour-codes: 038p #717370, 0040 #dee0e1, 041g #83111b, 03t3 #333333, 041w #313131, 042a #4d4d4d, 044j #2f637e, 0a4d #666666; @ext-colour-codes-total: 8;

.ext-colour-code-loop ( @l ) when ( @l > 0 ) { @item: extract( @ext-colour-codes, @l ); @code: extract( @item, 1 ); @colour: extract( @item, 2 ); .ext-@{code} { background-color: @colour !important; } .ext-colour-code-loop( @l - 1 ); } .ext-colour-code-loop( @ext-colour-codes-total ); 被剥夺了,事实上,没有一个类作为原始输入。有些是2个字符,有些是3个。如何防止这种情况发生?

1 个答案:

答案 0 :(得分:2)

确保将代码视为字符串。将所有Error: [ng:areq] Argument 'ProcessController' is not a function, got undefined 更改为044j,使其成为转义字符串。

文档:http://lesscss.org/features/#features-overview-feature-escaping