1 |
8725
|
aaronmk
|
match,repl,comment
|
2 |
8745
|
aaronmk
|
,,#### formatting fixes
|
3 |
8725
|
aaronmk
|
"(?<=</TITLE>
|
4 |
|
|
)(?!<style)","<style type=""text/css"">
|
5 |
|
|
/*fixes for default HTML tag formatting*/
|
6 |
|
|
dl dl {margin-left: 30pt;} /*indent nested <dl>s*/
|
7 |
|
|
|
8 |
|
|
/*readability*/
|
9 |
|
|
html {font-family: sans-serif;} /*use readable font*/
|
10 |
|
|
dt {margin-top: 6pt; margin-bottom: 6pt;} /*visually separate <dt>s*/
|
11 |
|
|
|
12 |
|
|
/*Firefox bookmarks-specific*/
|
13 |
8752
|
aaronmk
|
dd {white-space: pre-wrap;} /*format bookmark description as plaintext*/
|
14 |
8725
|
aaronmk
|
</style>
|
15 |
|
|
",add <style>
|
16 |
|
|
"^<DD>.*(?:
|
17 |
|
|
(?! *<).*)*(?=
|
18 |
|
|
*<DL>)","\g<0>
|
19 |
|
|
</DD>",close <DD> when followed by tags which don't autoclose it properly
|
20 |
8751
|
aaronmk
|
(?s)(<A .*?>)(?:<img\b.*?/>)?,"\1<img width=""16"" height=""16"" src=""blank.gif"" style=""margin-right: 0.5em;""/>",display placeholder favicon image for every link to ensure uniform alignment
|
21 |
8851
|
aaronmk
|
"(?s)(\bICON_URI=("".*?"").*?>.*?\bsrc=)""blank\.gif""",\1\2,display ICON_URI attribute as favicon when available
|
22 |
8745
|
aaronmk
|
,,#### svn diff cleanup
|
23 |
8850
|
aaronmk
|
" ICON=""data:.*?""",,"remove ICON attributes with inline image data, which are not needed and clutter up the svn diff"
|
24 |
8728
|
aaronmk
|
" LAST_MODIFIED="".*?""",,"remove LAST_MODIFIED attributes, which seem to change whenever the favicon is updated and clutter up the svn diff"
|
25 |
8745
|
aaronmk
|
,,#### bookmark text fixes
|
26 |
9344
|
aaronmk
|
"(^(?!.*<H3\b).*
|
27 |
11664
|
aaronmk
|
<DD>)(?!"|-+$|
|
28 |
|
|
*<)(?:[^:\n]*? description: )?",\1page's description: ,"label page's description as such to avoid confusing it with comments added by the bookmark author, who may not agree with it. the page's description is in the 1st paragraph(s), when provided. if the bookmark desc starts with "" or a blank line, this is an author-added quotation or comment and not the page's description."
|
29 |
8745
|
aaronmk
|
,,#### bookmark reorganization
|
30 |
8755
|
aaronmk
|
"(?s)(^<DL><p>
|
31 |
|
|
<DT><H3 [^\n]*
|
32 |
|
|
<DL><p>
|
33 |
8754
|
aaronmk
|
)(.*)(^ <DT><H3 [^\n]*PERSONAL_TOOLBAR_FOLDER=""true"">Bookmarks Toolbar</H3>
|
34 |
|
|
.*?
|
35 |
8744
|
aaronmk
|
</DL><p>
|
36 |
8755
|
aaronmk
|
)",\1\3\2,move Bookmarks Toolbar to beginning inside first folder
|
37 |
8754
|
aaronmk
|
"(?s)(?<=PERSONAL_TOOLBAR_FOLDER=""true"">Bookmarks Toolbar</H3>
|
38 |
|
|
)<DD>.*?</DD>
|
39 |
8744
|
aaronmk
|
",,remove Bookmarks Toolbar desc
|
40 |
|
|
"(?<=PERSONAL_TOOLBAR_FOLDER=""true"">)Bookmarks Toolbar(?=</H3>$)",Quick links,rename Bookmarks Toolbar to Quick links
|
41 |
8761
|
aaronmk
|
"^<DL><p>
|
42 |
|
|
<DT><H3(?! style=)","\g<0> style=""font-size: 200%;""",make first folder name the page title
|
43 |
8757
|
aaronmk
|
"^<H1>.*?</H1>
|
44 |
|
|
",,remove previous page title
|
45 |
8758
|
aaronmk
|
"(?s)(?<=^<TITLE>)[^\n]*?(?=</TITLE>
|
46 |
8761
|
aaronmk
|
.*?
|
47 |
|
|
<DL><p>
|
48 |
|
|
<DT><H3[^\n]*?>([^\n]*?)</H3>$)",\1,use page title as window title
|
49 |
8781
|
aaronmk
|
,,#### indexing
|
50 |
8785
|
aaronmk
|
(<DT>)(?:<a name=.*?>)?(<H3[^\n]*?>(.*?)</H3>)(?:</a>)?,"\1<a name=""\3"" href=""#\3"">\2</a>",add hyperlinked HTML anchors for folders
|
51 |
9325
|
aaronmk
|
"(?i)(<A\b.*? HREF=""(?!#)(.*?)"")(?: name="".*?"")?","\1 name=""\2""",add HTML anchors for external links' URLs
|
52 |
9327
|
aaronmk
|
"(?i)(<A\b[^>]* HREF=""(?!#)[^>]*>(?!<H3\b)(?:<[^>]*>)*([^<]*)</A>)(?:<a name=.*?>.*?</a>)?","\1<a name=""\2"" href=""#\2"" style=""margin-left: 0.5em;"">¶</a>",add hyperlinked HTML anchors for external links' names
|
53 |
9786
|
aaronmk
|
,,#### formatting fixes
|
54 |
|
|
<([\w:-]+)\b.*?>.*?</\1>,unescape_html(),"unescape HTML in page's description. must happen *after* adding HTML anchors to <a> tags, so the name attribute is added to the *bookmark's* <a> tag."
|