「コメントマーク付け外し」の版間の差分

MSY-07 (トーク | 投稿記録)
SyntaxHighlightにcopyの追加
MSY-07 (トーク | 投稿記録)
余分なセミコロンの除去
 
111行目: 111行目:
Sel.SetAnchorPoint(mePosLogical, 1, ty);
Sel.SetAnchorPoint(mePosLogical, 1, ty);
Sel.Text = Sel.Text.replace(new RegExp(
Sel.Text = Sel.Text.replace(new RegExp(
   "^("+indent+")"+comment.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&"); //コメント行
   "^("+indent+")"+comment.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&") //コメント行
  +"|^(?![ \t]*$)" ,"gm") //空白行でない行頭
  +"|^(?![ \t]*$)" ,"gm") //空白行でない行頭
  ,function($0,$indent){return $0 ? $indent : comment}
  ,function($0,$indent){return $0 ? $indent : comment}
スポンサーリンク