about summary refs log tree commit diff stats
path: root/src/js/regex.nim
Commit message (Collapse)AuthorAgeFilesLines
* ouchbptato2023-09-081-1/+1
|
* regex: avoid infinite loopbptato2023-09-081-1/+7
| | | | | A capture size of 0 (e.g. |) no longer sends the regex matcher into an infinite loop.
* javascript: misc. refactoringsbptato2023-08-241-3/+2
| | | | | | | | | | | | * Remove some unused properties from objects * Un-extern JSFunctionList * Remove js/javascript dependency from regex (the wrapper functions were rather pointless) * Remove setProperty (only toJS(Table) used it, but there we have to use defineProperty instead.) * Accordingly, use definePropertyCWE in toJS(Table) * Simplify fromJSTable (replace pointer arithmetic with UncheckedArray) * Reduce implicit `result' usage
* javascript: update Events, misc fixes & additionsbptato2023-08-201-7/+15
| | | | | | | | | | | | | | Events: just implement the interfaces, no events are triggered yet. JS changes: * add LegacyUnforgeable * make consts enumerable * fix crash in isInstanceOf * fix destructor warnings * refactor registerType As a result, peakmem is now 1G+ on 1.6.14. It stays ~750M on 2.0.0. Hmm. Well, better upgrade to 2.0.0 I guess.
* Add compileMatchRegexbptato2023-07-251-0/+35
| | | | | | | This makes it so that host = 'example\.org' mandates an exact match, but host = '^example' matches example.org, example.com, etc. (Previously, 'example\.org' would have matched exampleexample.org as well, which was quite counter-intuitive.)
* Add utf-8 support to libregexpbptato2023-07-041-96/+10
| | | | | | | This allows us to greatly simplify exec(Regex). In particular, we no longer have to convert any line containing non-ascii characters into UTF-16 (which was a significant inefficiency in regex search until now).
* Option -> Opt in config, return error in compileSearchRegexbptato2023-06-241-11/+11
|
* regex: fix setting start in unicode stringsbptato2023-01-031-1/+1
| | | | | We have to set it to (capture - cstr) >> 1, because libregexp later shifts it left.
* buffer: fix some search bugs & refactor regex stuffbptato2023-01-011-27/+27
| | | | | | | | cursorBytes uses twidth now. cursorNextMatch matches the byte *after* the cursor (somewhat more consistently than before). match() no longer counts capture groups. LRE_FLAG_GLOBAL now goes through the entire string.
* Add referer support, re-render on windowChangebptato2022-12-131-2/+2
|
* Fix stream error handling confusion, title displaybptato2022-12-131-0/+3
| | | | Also probably other fixes.
* Add more cookie optionsbptato2022-12-131-0/+3
|
* regex.nim: remove unused functionsbptato2022-12-101-42/+1
| | | | Including replace.
* Add support for the encoding standard, fix parseLegacyColorbptato2022-12-101-1/+68
| | | | Also, fix a bug in the
* Add siteconf, fix lineedit bugsbptato2022-11-291-0/+45
| | | | | | This enables rule-based dynamic url rewriting. Also, lineedit is a bit less broken now (though it's still less than ideal.)
* Rewrite buffer/pager for multi-processingbptato2022-11-191-9/+16
|
* Incremental search fixesbptato2022-07-251-2/+2
|
* Improved incremental search: support unicodebptato2022-07-231-8/+42
|
* Add search functionbptato2022-07-221-0/+105
Uses libregexp from QuickJS. Incremental search is quite hacky for now, but overall it seems to work OK.