mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-30 02:20:08 +00:00
lots of minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4bf81c5cdb
commit
e07e0165bc
19
pwiki2.js
19
pwiki2.js
@ -337,6 +337,13 @@ object.Constructor('BasePage', {
|
|||||||
// referrer -- a previous page location...
|
// referrer -- a previous page location...
|
||||||
referrer: undefined,
|
referrer: undefined,
|
||||||
|
|
||||||
|
// .path is a proxy to .location
|
||||||
|
// XXX do we need this???
|
||||||
|
get path(){
|
||||||
|
return this.location },
|
||||||
|
set path(value){
|
||||||
|
this.location = value },
|
||||||
|
|
||||||
//* XXX HISTORY...
|
//* XXX HISTORY...
|
||||||
// NOTE: set this to false to disable history...
|
// NOTE: set this to false to disable history...
|
||||||
__history: undefined,
|
__history: undefined,
|
||||||
@ -499,6 +506,9 @@ var BaseParser =
|
|||||||
module.BaseParser = {
|
module.BaseParser = {
|
||||||
// patterns...
|
// patterns...
|
||||||
//
|
//
|
||||||
|
// The way the patterns are organized might seem a bit overcomplicated
|
||||||
|
// and it has to be to be able to reuse the same pattern in different
|
||||||
|
// contexts, e.g. the arguments pattern...
|
||||||
|
|
||||||
//
|
//
|
||||||
// needs:
|
// needs:
|
||||||
@ -506,6 +516,9 @@ module.BaseParser = {
|
|||||||
// PREFIX -- 'inline' or 'elem'
|
// PREFIX -- 'inline' or 'elem'
|
||||||
//
|
//
|
||||||
// XXX quote escaping???
|
// XXX quote escaping???
|
||||||
|
// /(?<quote>['"])(\\\k<quote>|[^\1])*\k<quote>/
|
||||||
|
// ...this will work but we'll also need to remove the \ in the
|
||||||
|
// final string...
|
||||||
MACRO_ARGS: ['(',[
|
MACRO_ARGS: ['(',[
|
||||||
// arg='val' | arg="val" | arg=val
|
// arg='val' | arg="val" | arg=val
|
||||||
'\\s+(?<PREFIXArgName>[a-z]+)\\s*=\\s*(?<PREFIXArgValue>'+([
|
'\\s+(?<PREFIXArgName>[a-z]+)\\s*=\\s*(?<PREFIXArgValue>'+([
|
||||||
@ -579,10 +592,7 @@ module.BaseParser = {
|
|||||||
// NOTE: the -2 here is to compensate for the leading and trailing ""'s...
|
// NOTE: the -2 here is to compensate for the leading and trailing ""'s...
|
||||||
return '<MACROS>'.split(this.buildMacroPattern()).length - 2 },
|
return '<MACROS>'.split(this.buildMacroPattern()).length - 2 },
|
||||||
|
|
||||||
|
// XXX should this be closer to .stripComments(..)
|
||||||
|
|
||||||
// XXX should we cache MACRO_PATTERN and MACRO_PATTERN_GROUPS???
|
|
||||||
//
|
|
||||||
// XXX do we need basic inline and block commets a-la lisp???
|
// XXX do we need basic inline and block commets a-la lisp???
|
||||||
COMMENT_PATTERN: RegExp('('+[
|
COMMENT_PATTERN: RegExp('('+[
|
||||||
// <!--[pwiki[ .. ]]-->
|
// <!--[pwiki[ .. ]]-->
|
||||||
@ -594,6 +604,7 @@ module.BaseParser = {
|
|||||||
'<\\s*pwiki-comment[^\\/>]*\\/>',
|
'<\\s*pwiki-comment[^\\/>]*\\/>',
|
||||||
].join('|') +')', 'smig'),
|
].join('|') +')', 'smig'),
|
||||||
|
|
||||||
|
|
||||||
// helpers...
|
// helpers...
|
||||||
//
|
//
|
||||||
getPositional: function(args){
|
getPositional: function(args){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user