/* * This is simple jEdit macro to replace all headings tags (h1, h2...h6) with one level lower * h1->h2, h3->h4, h6->p * charset: UTF-8 * * (c) TAAT Digital Technologies 2006 * Tomasz Pęszor * info at taat dot pl * http://taat.pl/jedit/ */ void headings_down(){ if (textArea.getSelectedText()==null) { mcp=textArea.getCaretPosition(); textArea.selectAll(); sn=true; } SearchAndReplace.setIgnoreCase(true); SearchAndReplace.setRegexp(false); SearchAndReplace.setBeanShellReplace(false); // h6 SearchAndReplace.setSearchString("len) mcp=len; textArea.setCaretPosition(mcp); } } // main if(buffer.isReadOnly()) Macros.error(view, "Buffer is read-only."); else headings_down(); /* Macro index entry (in DocBook XML) Sort_using_locale_(Reverse).bsh This is simple jEdit macro to replace all headings tags (h1, h2...h6) with one level lower h1->h2, h3->h4, h6->p (c) TAAT Digital Technologies 2006 */