Le vendredi 23 mai 2014 09:43:38, vous avez =E9crit :
> thx a lot!
> =
> this do the trick and I better understand how works contexts, now i need =
to
> find out how apply an IncludeRules ##JavaScript only on the determine code
> block, but i ll try a bit by myself.
> =
> > it is to use dynamic contexts that capture the indent level
> =
> what about "dynamic=3D"true" keyword? in which case should we use?
> =
> Le jeudi 22 mai 2014, 16:12:32 Matthew Woehlke a =E9crit :
> > On 2014-05-19 20:10, jules wrote:
> > > im trying to make a new syntax file for the "jade template engine", a=
nd
> > > i
> > > can't find a viable solution for the case where the end of scope is o=
nly
> > > indentation.
> > =
> > Take a look at ReStructuredText, which has a similar need. The way I did
> > it is to use dynamic contexts that capture the indent level with
> > look-ahead rules that match the indent followed by any non-space
> > character to pop the context.
after a few weeks of distance, i returned to the subject with fresh eyes...
With ReStructuredText, you try to capture the indent level in this part: =
(...)
(...)
but it seems just equal to the last regex -> changing context when a =
line doesn't start with some kind of white space, and this is doing the sam=
e =
result for me:
the test case:
(with : RegExpr attribute=3D"Code" String=3D"script."...)
html
body
#head.center
h1 test
=
script.
console.log('test');
var i =3D 6;
for (i; i>1; i--) {
console.log(i);
}
=
div <=3D=3D=3D=3D context not switch
p blabla
so, i returned to the dynamic rules and to the capture regex idea, and or i =
discovered a bug, or i missed something. If i do that: =
i should capture "ri", and i should use it like that in according to the =
manual
html
body
#head.center
h1 test
=
script.
console.log('test');
var i =3D 6;
for (i; i>1; i--) {
console.log(i);
}
ri <=3D=3D=3D=3D should be detected?! but it is not!
div =
p blabbla
what I didn't understand?
thx
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel