2017-11-08 6 views
1

私はブートストラップポップオーバーのデータ内容を書いていますので、書式設定時に改行を保持したいと思います。だから私は使用した" - >"が2行目にあるときは引用符は一致しません

.popover { 
    white-space: pre-wrap; 
    max-width: 100%; 
} 

しかし、私は " - >" 2行目に書き込むとすぐに警告が表示されます。

これはこれはOK

<div class="panel panel-primary"> 
     <div class="panel-heading panel-head">Factors selection<a href="#" data-placement="left" data-toggle="popover" title="Info" 
      data-content='Select desired pair of factors.-> 
      Selection goes in this direction: XGroup YGroup, XFactor, YFactor' style="float:right" data-trigger="hover"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a></div> 
     <div class="panel-body"> 

警告である

<div class="panel panel-primary"> 
     <div class="panel-heading panel-head">Factors selection<a href="#" data-placement="left" data-toggle="popover" title="Info" 
      data-content='Select desired pair of factors. 
      Selection goes in this direction: XGroup YGroup, XFactor, YFactor' style="float:right" data-trigger="hover"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a></div> 
     <div class="panel-body"> 

、引用は

<div class="panel panel-primary"> 
     <div class="panel-heading panel-head">Factors selection<a href="#" data-placement="left" data-toggle="popover" title="Info" 
      data-content='Select desired pair of factors. 
      ->Selection goes in this direction: XGroup YGroup, XFactor, YFactor' style="float:right" data-trigger="hover"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a></div> 
     <div class="panel-body"> 

答えて

1

unmatchesをマークOKです - それ自体でそれは通常どおりため、エラーの原因と '>'コメントの終わりを '<! - 'とすると、コメントの先頭を意味します。新しい行、htmlはそれをコメントとして扱い、上記のテキストの続きとしては扱いません。 ベストプラクティスのためには、&#10 \を使用することをお勧めします。および&#13 \; (\を無視する)

'Select desired pair of factors.&#10;&#13;->Selection goes in this direction: XGroup YGroup, XFactor, YFactor' 

読みやすく、次のプログラマーは空白のオープン量よりもはっきりとあなたの意図を理解するでしょう。

関連する問題