mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
experimenting...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a65266566a
commit
33961a0b3f
@ -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...
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user