Artifact
690a415ba55cb0ce7de7698ba7dbf8704b57e679:
Wiki page
[Filters] by
tinus
2019-02-11 18:58:09.
0000: 44 20 32 30 31 39 2d 30 32 2d 31 31 54 31 38 3a D 2019-02-11T18:
0010: 35 38 3a 30 39 2e 35 31 34 0a 4c 20 46 69 6c 74 58:09.514.L Filt
0020: 65 72 73 0a 4e 20 74 65 78 74 2f 78 2d 6d 61 72 ers.N text/x-mar
0030: 6b 64 6f 77 6e 0a 50 20 30 39 37 66 64 31 30 36 kdown.P 097fd106
0040: 31 65 34 63 66 64 62 31 39 30 64 38 64 34 62 36 1e4cfdb190d8d4b6
0050: 32 35 31 61 33 63 32 38 35 62 38 66 35 62 63 38 251a3c285b8f5bc8
0060: 0a 55 20 74 69 6e 75 73 0a 57 20 32 39 37 33 0a .U tinus.W 2973.
0070: 23 20 46 69 6c 74 65 72 73 0d 0a 0d 0a 42 79 20 # Filters....By
0080: 64 65 66 61 75 6c 74 2c 20 74 68 65 20 70 72 65 default, the pre
0090: 76 69 65 77 20 70 6c 75 67 69 6e 20 6f 6e 6c 79 view plugin only
00a0: 20 64 69 73 70 6c 61 79 73 20 61 20 70 72 65 76 displays a prev
00b0: 69 65 77 20 6f 66 20 48 54 4d 4c 20 6f 72 20 58 iew of HTML or X
00c0: 4d 4c 20 66 69 6c 65 73 20 e2 80 94 20 61 6e 64 ML files — and
00d0: 20 66 6f 72 20 58 4d 4c 20 66 69 6c 65 73 2c 20 for XML files,
00e0: 6f 6e 6c 79 20 77 68 65 6e 20 74 68 65 79 20 63 only when they c
00f0: 6f 6e 74 61 69 6e 20 61 20 5b 70 72 6f 63 65 73 ontain a [proces
0100: 73 69 6e 67 2d 69 6e 73 74 72 75 63 74 69 6f 6e sing-instruction
0110: 5d 5b 31 5d 20 66 6f 72 20 61 20 73 74 79 6c 65 ][1] for a style
0120: 73 68 65 65 74 2e 0d 0a 0d 0a 46 69 6c 74 65 72 sheet.....Filter
0130: 73 20 61 72 65 20 61 20 77 61 79 20 74 6f 20 70 s are a way to p
0140: 72 65 2d 70 72 6f 63 65 73 73 20 6f 74 68 65 72 re-process other
0150: 20 66 69 6c 65 73 20 74 68 61 6e 20 48 54 4d 4c files than HTML
0160: 20 6f 72 20 58 4d 4c 20 73 6f 20 74 68 65 79 20 or XML so they
0170: 5f 63 61 6e 5f 20 62 65 20 70 72 65 76 69 65 77 _can_ be preview
0180: 65 64 2e 0d 0a 0d 0a 23 23 20 44 65 66 69 6e 69 ed.....## Defini
0190: 74 69 6f 6e 0d 0a 0d 0a 46 69 6c 74 65 72 73 20 tion....Filters
01a0: 61 72 65 20 64 65 66 69 6e 65 64 20 69 6e 20 61 are defined in a
01b0: 20 73 70 65 63 69 61 6c 20 60 66 69 6c 74 65 72 special `filter
01c0: 73 2e 69 6e 69 60 20 66 69 6c 65 20 69 6e 20 74 s.ini` file in t
01d0: 68 65 20 43 6f 6e 66 69 67 20 64 69 72 65 63 74 he Config direct
01e0: 6f 72 79 2e 20 54 68 65 20 72 65 63 6f 6d 6d 65 ory. The recomme
01f0: 6e 64 65 64 20 77 61 79 20 74 6f 20 6f 70 65 6e nded way to open
0200: 20 74 68 65 20 66 69 6c 74 65 72 20 63 6f 6e 66 the filter conf
0210: 69 67 75 72 61 74 69 6f 6e 20 66 69 6c 65 20 69 iguration file i
0220: 73 20 76 69 61 20 74 68 65 20 6d 65 6e 75 20 6f s via the menu o
0230: 70 74 69 6f 6e 2e 0d 0a 0d 0a 45 61 63 68 20 66 ption.....Each f
0240: 69 6c 74 65 72 20 69 73 20 64 65 66 69 6e 65 64 ilter is defined
0250: 20 69 6e 20 69 74 73 20 6f 77 6e 20 73 65 63 74 in its own sect
0260: 69 6f 6e 2c 20 73 6f 20 62 79 20 75 73 69 6e 67 ion, so by using
0270: 20 61 20 73 65 63 74 69 6f 6e 20 68 65 61 64 65 a section heade
0280: 72 20 62 65 74 77 65 65 6e 20 73 71 75 61 72 65 r between square
0290: 20 62 72 61 63 6b 65 74 73 2c 20 66 6f 6c 6c 6f brackets, follo
02a0: 77 65 64 20 62 79 20 74 68 65 20 6c 61 6e 67 75 wed by the langu
02b0: 61 67 65 20 61 6e 64 2f 6f 72 20 66 69 6c 65 20 age and/or file
02c0: 65 78 74 65 6e 73 69 6f 6e 20 69 74 20 73 68 6f extension it sho
02d0: 75 6c 64 20 77 6f 72 6b 20 66 6f 72 2c 20 61 6e uld work for, an
02e0: 64 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 d the command li
02f0: 6e 65 20 74 6f 20 65 78 65 63 75 74 65 3a 0d 0a ne to execute:..
0300: 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 6c 74 65 .. [Filte
0310: 72 20 6e 61 6d 65 5d 0d 0a 20 20 20 20 20 20 20 r name]..
0320: 20 45 78 74 65 6e 73 69 6f 6e 3d 3c 2e 65 78 74 Extension=<.ext
0330: 3e 0d 0a 20 20 20 20 20 20 20 20 4c 61 6e 67 75 >.. Langu
0340: 61 67 65 3d 3c 4e 6f 74 65 70 61 64 2b 2b 20 6c age=<Notepad++ l
0350: 61 6e 67 75 61 67 65 20 6e 61 6d 65 3e 0d 0a 20 anguage name>..
0360: 20 20 20 20 20 20 20 43 6f 6d 6d 61 6e 64 3d 3c Command=<
0370: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 2c 20 75 73 command line, us
0380: 69 6e 67 20 25 31 20 66 6f 72 20 74 68 65 20 63 ing %1 for the c
0390: 75 72 72 65 6e 74 6c 79 20 73 65 6c 65 63 74 65 urrently selecte
03a0: 64 20 66 69 6c 65 3e 0d 0a 0d 0a 54 6f 20 74 65 d file>....To te
03b0: 6d 70 6f 72 61 72 69 6c 79 20 64 69 73 61 62 6c mporarily disabl
03c0: 65 20 61 20 66 69 6c 74 65 72 20 77 69 74 68 6f e a filter witho
03d0: 75 74 20 63 6f 6d 70 6c 65 74 65 6c 79 20 64 65 ut completely de
03e0: 6c 65 74 69 6e 67 20 69 73 2c 20 79 6f 75 20 63 leting is, you c
03f0: 61 6e 20 73 74 61 72 74 20 74 68 65 20 66 69 6c an start the fil
0400: 74 65 72 20 6e 61 6d 65 20 77 69 74 68 20 61 20 ter name with a
0410: 27 2d 27 20 68 79 70 68 65 6e 20 28 65 2e 67 2e '-' hyphen (e.g.
0420: 20 60 5b 2d 46 69 6c 74 65 72 20 6e 61 6d 65 5d `[-Filter name]
0430: 60 29 3b 20 74 68 65 20 70 6c 75 67 69 6e 20 77 `); the plugin w
0440: 69 6c 6c 20 74 68 65 6e 20 73 6b 69 70 20 74 68 ill then skip th
0450: 61 74 20 66 69 6c 74 65 72 2e 0d 0a 0d 0a 23 23 at filter.....##
0460: 23 20 46 69 6c 74 65 72 20 73 65 6c 65 63 74 69 # Filter selecti
0470: 6f 6e 0d 0a 0d 0a 54 68 65 20 70 72 65 76 69 65 on....The previe
0480: 77 20 70 6c 75 67 69 6e 20 5b 64 65 63 69 64 65 w plugin [decide
0490: 73 5d 5b 32 5d 20 77 68 65 74 68 65 72 20 6f 72 s][2] whether or
04a0: 20 6e 6f 74 20 74 6f 20 72 75 6e 20 65 61 63 68 not to run each
04b0: 20 66 69 6c 74 65 72 20 62 61 73 65 64 20 6f 6e filter based on
04c0: 20 74 68 65 20 66 69 6c 65 27 73 20 65 78 74 65 the file's exte
04d0: 6e 73 69 6f 6e 20 4f 52 20 74 68 65 0d 0a 61 63 nsion OR the..ac
04e0: 74 69 76 65 20 68 69 67 68 6c 69 67 68 74 65 72 tive highlighter
04f0: 20 6c 61 6e 67 75 61 67 65 2e 20 20 54 68 65 20 language. The
0500: 66 69 72 73 74 20 66 69 6c 74 65 72 20 65 6e 63 first filter enc
0510: 6f 75 6e 74 65 72 65 64 20 69 73 20 72 75 6e 2c ountered is run,
0520: 20 61 6e 79 20 6f 74 68 65 72 20 6d 61 74 63 68 any other match
0530: 69 6e 67 20 66 69 6c 74 65 72 73 20 61 72 65 0d ing filters are.
0540: 0a 69 67 6e 6f 72 65 64 2e 0d 0a 0d 0a 2a 20 54 .ignored.....* T
0550: 68 65 20 60 4c 61 6e 67 75 61 67 65 60 20 66 69 he `Language` fi
0560: 65 6c 64 20 73 68 6f 75 6c 64 20 6d 61 74 63 68 eld should match
0570: 20 6f 6e 65 20 6f 66 20 4e 6f 74 65 70 61 64 2b one of Notepad+
0580: 2b 27 73 20 73 79 6e 74 61 78 20 68 69 67 68 6c +'s syntax highl
0590: 69 67 68 74 69 6e 67 20 6c 61 6e 67 75 61 67 65 ighting language
05a0: 20 6e 61 6d 65 73 2e 0d 0a 2a 20 54 68 65 20 60 names...* The `
05b0: 45 78 74 65 6e 73 69 6f 6e 60 20 66 69 65 6c 64 Extension` field
05c0: 20 6d 61 79 20 63 6f 6e 74 61 69 6e 20 6f 6e 65 may contain one
05d0: 20 6f 72 20 6d 6f 72 65 20 63 6f 6d 6d 61 2d 73 or more comma-s
05e0: 65 70 61 72 61 74 65 64 20 66 69 6c 65 20 65 78 eparated file ex
05f0: 74 65 6e 73 69 6f 6e 28 73 29 2e 0d 0a 2a 20 54 tension(s)...* T
0600: 68 65 20 60 46 69 6c 65 6e 61 6d 65 60 20 66 69 he `Filename` fi
0610: 65 6c 64 20 6d 61 79 20 63 6f 6e 74 61 69 6e 20 eld may contain
0620: 61 20 66 69 6c 65 20 6d 61 73 6b 20 28 69 6e 63 a file mask (inc
0630: 6c 75 64 69 6e 67 20 e2 80 98 6a 6f 6b 65 72 e2 luding ‘jokerâ
0640: 80 99 20 6f 72 20 e2 80 98 67 6c 6f 62 e2 80 99 €™ or ‘glob’
0650: 20 63 68 61 72 61 63 74 65 72 73 20 73 75 63 68 characters such
0660: 20 61 73 20 60 2a 60 2c 20 60 3f 60 3b 20 5b 73 as `*`, `?`; [s
0670: 65 65 20 64 65 73 63 72 69 70 74 69 6f 6e 5d 5b ee description][
0680: 33 5d 29 2e 0d 0a 0d 0a 4e 6f 74 65 20 74 68 61 3]).....Note tha
0690: 74 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 6f t at least one o
06a0: 66 20 74 68 65 73 65 20 74 68 72 65 65 20 66 69 f these three fi
06b0: 65 6c 64 73 20 6d 75 73 74 20 62 65 20 70 72 6f elds must be pro
06c0: 76 69 64 65 64 2c 20 6f 74 68 65 72 77 69 73 65 vided, otherwise
06d0: 20 74 68 65 20 66 69 6c 74 65 72 20 77 69 6c 6c the filter will
06e0: 20 6e 65 76 65 72 20 62 65 20 75 73 65 64 2e 0d never be used..
06f0: 0a 0d 0a 23 23 23 20 46 69 6c 74 65 72 20 65 78 ...### Filter ex
0700: 65 63 75 74 69 6f 6e 0d 0a 0d 0a 57 68 65 6e 20 ecution....When
0710: 74 68 65 20 70 6c 75 67 69 6e 20 68 61 73 20 64 the plugin has d
0720: 65 74 65 72 6d 69 6e 65 64 20 74 68 61 74 20 61 etermined that a
0730: 20 66 69 6c 74 65 72 20 73 68 6f 75 6c 64 20 62 filter should b
0740: 65 20 75 73 65 64 2c 20 69 74 20 77 69 6c 6c 20 e used, it will
0750: 74 72 79 20 74 6f 20 72 75 6e 20 74 68 65 20 67 try to run the g
0760: 69 76 65 6e 20 60 43 6f 6d 6d 61 6e 64 60 20 77 iven `Command` w
0770: 69 74 68 20 74 68 65 20 63 75 72 72 65 6e 74 20 ith the current
0780: 66 69 6c 65 2e 0d 0a 0d 0a 49 66 20 74 68 65 20 file.....If the
0790: 65 64 69 74 6f 72 20 68 61 73 20 6e 6f 20 63 68 editor has no ch
07a0: 61 6e 67 65 73 2c 20 74 68 65 20 66 69 6c 74 65 anges, the filte
07b0: 72 20 77 69 6c 6c 20 73 69 6d 70 6c 79 20 72 65 r will simply re
07c0: 70 6c 61 63 65 20 60 25 31 60 20 69 6e 20 74 68 place `%1` in th
07d0: 65 20 60 43 6f 6d 6d 61 6e 64 60 20 62 79 20 74 e `Command` by t
07e0: 68 65 20 66 75 6c 6c 20 70 61 74 68 20 61 6e 64 he full path and
07f0: 20 66 69 6c 65 6e 61 6d 65 20 6f 66 20 74 68 65 filename of the
0800: 20 63 75 72 72 65 6e 74 6c 79 20 73 65 6c 65 63 currently selec
0810: 74 65 64 20 66 69 6c 65 20 6e 61 6d 65 2e 20 49 ted file name. I
0820: 66 20 74 68 65 20 66 69 6c 65 20 68 61 73 6e 27 f the file hasn'
0830: 74 20 62 65 65 6e 20 73 61 76 65 64 20 79 65 74 t been saved yet
0840: 20 28 65 2e 67 2e 20 60 4e 65 77 20 31 60 29 2c (e.g. `New 1`),
0850: 20 6f 72 20 69 66 20 74 68 65 20 65 64 69 74 6f or if the edito
0860: 72 20 63 6f 6e 74 61 69 6e 73 20 63 68 61 6e 67 r contains chang
0870: 65 73 20 74 68 61 74 20 68 61 76 65 6e 27 74 20 es that haven't
0880: 62 65 65 6e 20 73 61 76 65 64 2c 20 69 74 20 77 been saved, it w
0890: 69 6c 6c 20 77 72 69 74 65 20 74 68 65 20 63 6f ill write the co
08a0: 6e 74 65 6e 74 73 20 74 6f 20 61 20 74 65 6d 70 ntents to a temp
08b0: 6f 72 61 72 79 20 66 69 6c 65 2c 20 61 6e 64 20 orary file, and
08c0: 72 75 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 run the command
08d0: 77 69 74 68 20 74 68 61 74 20 74 65 6d 70 6f 72 with that tempor
08e0: 61 72 79 20 66 69 6c 65 2e 0d 0a 0d 0a 54 68 65 ary file.....The
08f0: 20 6f 75 74 70 75 74 20 6f 66 20 74 68 65 20 63 output of the c
0900: 6f 6d 6d 61 6e 64 20 77 69 6c 6c 20 74 68 65 6e ommand will then
0910: 20 62 65 20 75 73 65 64 20 74 6f 20 64 69 73 70 be used to disp
0920: 6c 61 79 20 74 68 65 20 70 72 65 76 69 65 77 2e lay the preview.
0930: 20 53 6f 20 74 68 65 20 6f 75 74 70 75 74 20 68 So the output h
0940: 61 73 20 74 6f 20 62 65 20 61 20 66 6f 72 6d 61 as to be a forma
0950: 74 20 74 68 61 74 20 63 61 6e 20 62 65 20 64 69 t that can be di
0960: 73 70 6c 61 79 65 64 20 62 79 20 74 68 65 20 53 splayed by the S
0970: 68 65 6c 6c 20 44 6f 63 75 6d 65 6e 74 20 65 6e hell Document en
0980: 67 69 6e 65 2c 20 6f 72 2c 20 62 61 73 69 63 61 gine, or, basica
0990: 6c 6c 79 2c 20 62 79 20 49 6e 74 65 72 6e 65 74 lly, by Internet
09a0: 20 45 78 70 6c 6f 72 65 72 2e 0d 0a 0d 0a 0d 0a Explorer.......
09b0: 23 23 20 45 78 61 6d 70 6c 65 0d 0a 0d 0a 43 68 ## Example....Ch
09c0: 65 63 6b 20 6f 75 74 20 74 68 65 20 5b 73 61 6d eck out the [sam
09d0: 70 6c 65 20 66 69 6c 74 65 72 20 64 65 66 69 6e ple filter defin
09e0: 69 74 69 6f 6e 5d 5b 34 5d 20 69 6e 20 74 68 65 ition][4] in the
09f0: 20 70 6c 75 67 69 6e 27 73 20 60 43 6f 6e 66 69 plugin's `Confi
0a00: 67 60 20 64 69 72 65 63 74 6f 72 79 3a 0d 0a 0d g` directory:...
0a10: 0a 3c 69 66 72 61 6d 65 20 73 72 63 3d 22 72 61 .<iframe src="ra
0a20: 77 3f 63 69 3d 70 75 62 6c 69 73 68 26 66 69 6c w?ci=publish&fil
0a30: 65 6e 61 6d 65 3d 43 6f 6e 66 69 67 2f 50 72 65 ename=Config/Pre
0a40: 76 69 65 77 48 54 4d 4c 2f 66 69 6c 74 65 72 73 viewHTML/filters
0a50: 2e 73 61 6d 70 6c 65 2e 69 6e 69 26 6d 3d 74 65 .sample.ini&m=te
0a60: 78 74 2f 70 6c 61 69 6e 22 20 73 74 79 6c 65 3d xt/plain" style=
0a70: 22 77 69 64 74 68 3a 39 38 25 3b 62 6f 74 74 6f "width:98%;botto
0a80: 6d 3a 30 70 78 22 20 6f 6e 6c 6f 61 64 3d 22 74 m:0px" onload="t
0a90: 68 69 73 2e 73 74 79 6c 65 2e 68 65 69 67 68 74 his.style.height
0aa0: 3d 74 68 69 73 2e 63 6f 6e 74 65 6e 74 44 6f 63 =this.contentDoc
0ab0: 75 6d 65 6e 74 2e 62 6f 64 79 2e 73 63 72 6f 6c ument.body.scrol
0ac0: 6c 48 65 69 67 68 74 20 2b 27 70 78 27 3b 22 3e lHeight +'px';">
0ad0: 3c 2f 69 66 72 61 6d 65 3e 0d 0a 0d 0a 0d 0a 0d </iframe>.......
0ae0: 0a 5b 31 5d 3a 20 68 74 74 70 73 3a 2f 2f 65 6e .[1]: https://en
0af0: 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 .wikipedia.org/w
0b00: 69 6b 69 2f 50 72 6f 63 65 73 73 69 6e 67 5f 49 iki/Processing_I
0b10: 6e 73 74 72 75 63 74 69 6f 6e 23 45 78 61 6d 70 nstruction#Examp
0b20: 6c 65 73 0d 0a 5b 32 5d 3a 20 2f 61 72 74 69 66 les..[2]: /artif
0b30: 61 63 74 3f 63 69 3d 74 72 75 6e 6b 26 66 69 6c act?ci=trunk&fil
0b40: 65 6e 61 6d 65 3d 73 72 63 25 32 46 46 5f 50 72 ename=src%2FF_Pr
0b50: 65 76 69 65 77 48 54 4d 4c 2e 70 61 73 26 6c 6e eviewHTML.pas&ln
0b60: 3d 33 37 30 2d 34 35 33 0d 0a 5b 33 5d 3a 20 68 =370-453..[3]: h
0b70: 74 74 70 3a 2f 2f 64 6f 63 77 69 6b 69 2e 65 6d ttp://docwiki.em
0b80: 62 61 72 63 61 64 65 72 6f 2e 63 6f 6d 2f 4c 69 barcadero.com/Li
0b90: 62 72 61 72 69 65 73 2f 58 45 32 2f 65 6e 2f 53 braries/XE2/en/S
0ba0: 79 73 74 65 6d 2e 4d 61 73 6b 73 2e 4d 61 74 63 ystem.Masks.Matc
0bb0: 68 65 73 4d 61 73 6b 23 44 65 73 63 72 69 70 74 hesMask#Descript
0bc0: 69 6f 6e 0d 0a 5b 34 5d 3a 20 2f 61 72 74 69 66 ion..[4]: /artif
0bd0: 61 63 74 3f 63 69 3d 70 75 62 6c 69 73 68 26 66 act?ci=publish&f
0be0: 69 6c 65 6e 61 6d 65 3d 43 6f 6e 66 69 67 2f 50 ilename=Config/P
0bf0: 72 65 76 69 65 77 48 54 4d 4c 2f 66 69 6c 74 65 reviewHTML/filte
0c00: 72 73 2e 73 61 6d 70 6c 65 2e 69 6e 69 0a 5a 20 rs.sample.ini.Z
0c10: 66 39 34 33 30 63 35 31 33 35 35 33 31 35 36 61 f9430c513553156a
0c20: 34 33 32 36 61 32 65 35 39 33 61 30 38 61 39 34 4326a2e593a08a94
0c30: 0a .