Changes

Jump to navigation Jump to search
475 bytes added ,  10:38, 1 July 2020
The ConTeXt source browser at [http://source.contextgarden.net http://source.contextgarden.net] has recently been replaced by a Lua implementation that uses Hans Hagen's SciTE lexers for syntax highlighting and a search index that is built up using a Lua script.
''Note:'' for some of the really large files (for example <code>char-def.lua</code>), syntax highlighting is disabled, and <code>context-en.xml</code> is skipped completely.
= Browsing the installed files =
This installation is not always completely in sync with the latest ConTeXt distribution, because setting up the installation on the server is quite elaborate (as various auxiliary databases need to be updated as well).
When viewing a file, on top of the highlighted source the file name is displayed. This is also a download link. It also shows the file size and a modification time (but that is the creation time of the ConTeXt distribution, so not particularly useful).
= Searching the sources =
''Note:'' At the moment, you cannot do AND/OR searches or search for multiple words at the same time.
There are four option checkboxes immediately below the search input, and two separate options, to control the search. Each of these are optional, with irrelevant values. The script only looks at the existence of the option, it never checks the actual values except for the value of the <code>search</code> parameter itself.
== ignore comments Optional search index: Comments ==
Name: '''igncommentscomments'''Default: '''ONOFF''' This includes the index of everything that is marked as 'comment' by the SciTE lexers.  == Optional search index: Docs == Name: '''docs'''Default: '''OFF'''
This includes the index of all files in the <code>doc/</code> subtree.
This skips everything that is marked as 'comment' by the SciTE lexers. == Optional search index: MkII ==
== ignore doc tree ==Name: '''mkii'''Default: '''OFF'''
Name: '''igndocs'''Default: '''ON'''This includes the index of MkII files.
This skips all files in the <code>doc/</code> subtree.== Optional search index: Data ==
Name: '''data'''Default: '''OFF''' This includes the index of Data files (<code>data/</code> subtree, <code>interface/</code> subtree, <code>scripts/</code> subtree, sample files, test files, et cetera). == whole Whole words only ==
Name: '''wholewords'''
Modifies the search pattern by anchoring it to the begin and end of the search index keys, as if it was enclosed in <code>^</code>...<code>$</code>
== lua Lua string pattern matches ==
Name: '''pat'''
Quick start: Lua patterns have roughly the same list of special characters as simple regular expressions, but they use the <code>%</code> character for escaping those. See the [https://www.lua.org/manual/5.3/manual.html#6.4.1 Patterns section] of the Lua manual for details.
 
= Highlighting of search terms =
* Only words longer than three letters are indexed.
* Lua language keywords and matches that occur more than 1000 times (approx.) are not indexed.
* All of the files in the <code>patterns/</code> subtree and the top-level <code>fonts/</code> tree are skipped.
If you find a problem that is not caused by one of the aforementioned limitations, please report it to [[User:taco]] by sending an email to [mailto:gardeners@contextgarden.net gardeners@contextgarden.net].
[[Category:Development]]

Navigation menu