Last active
August 29, 2015 14:19
-
-
Save kiwofusi/0c40929d7afc0cb9473b to your computer and use it in GitHub Desktop.
アメブロ書くときに使う自分用記法を変換する秀丸マクロ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 秀丸マクロ | |
// アメブロを書くときの自分用記法 | |
// 使い方:このマクロを実行すると以下の記法に当てはまるところがアメブロ用のHTMLになる。ファイル全体を置換する | |
// ※Shift-JISで保存しないと動かないです | |
// | |
// {hoge} | |
// ->ピンク(僕は人名に使ってる) | |
// <font color="#EE82EE">hoge</font> | |
// | |
// {「hoge」} | |
// ->オレンジ(僕は楽曲名に使ってる) | |
// <font color="#FA8072">「hoge」</font> | |
// | |
// {{hoge}} | |
// ->太字 <strong>hoge</strong> | |
// | |
// {{{hoge}}} | |
// {{{「hoge」}}} | |
// ->太字+ピンクorオレンジ | |
// <strong><font color="#EE82EE">hoge</font></strong> | |
// <strong><font color="#FA8072">「hoge」</font></strong> | |
// | |
// *hoge | |
// ->フォントサイズ4、青字(僕は見出しに使ってる) | |
// <font size="4" color="#0000FF">hoge</font> | |
// | |
// -- | |
// ->横線 | |
// <hr> | |
setcompatiblemode 0x0F; | |
begingroupundo; | |
replaceallfast "{{{([^}]+)}}}" , "<strong>{\\1}</strong>" , regular, nocasesense, nohilight; | |
replaceallfast "{{([^}]+)}}" , "<strong>\\1</strong>" , regular, nocasesense, nohilight; | |
replaceallfast "{(「[^}]+」)}" , "<font color=\"#FA8072\">\\1</font>" , regular, nocasesense, nohilight; | |
replaceallfast "{([^}]+)}" , "<font color=\"#EE82EE\">\\1</font>" , regular, nocasesense, nohilight; | |
replaceallfast "^\\*(.+)$" , "<font size=\"4\" color=\"#0000FF\">\\1</font>" , regular, nocasesense, nohilight; | |
replaceallfast "\\-\\-" , "<hr>" , regular, nocasesense, nohilight; | |
endgroupundo 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment