experimenting...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-12-11 03:26:33 +03:00
parent a65266566a
commit 33961a0b3f
2 changed files with 26 additions and 0 deletions

View File

@ -246,6 +246,31 @@ var offsetMap = function(A, B, m=[]){
// find all common sections...
// XXX test...
function cs(A, B){
var map = []
for(var i=0; i < A.length; i++){
for(var j=0; j < B.length; j++){
var l = 0
while(A[i+j+l] == B[j+l]
&& j+l < B.length){
l++ }
if(l > 0){
map.push([i, j, l])
// Q: can we skip here? ...will skipping
// prevent matching "ababc" with "abc"??
j += l } } }
return map }
// build chains of blocks with their lengths...
function comb(map){
XXX
}
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Plugins... // Plugins...

View File

@ -49,6 +49,7 @@ var setup = function(){
- ## Bugs: - ## Bugs:
focused:: true focused:: true
- BUG: caret positioning broken - BUG: caret positioning broken
- new strategy: try and build offset maps on parse...
- *TODO*:: - *TODO*::
- ``` - ```
text text text text text text