From 4cd184d2b50134a462940f7de3428f507aff8b60 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 22 May 2008 19:37:54 -0400 Subject: simplify syntax for import of external files, e.g.: << filename.sst minor related syntax changes, automatic version bump make appropriate additions to vim-syntax consider use of vim-addon manager --- lib/sisu/v0/composite.rb | 9 +++------ lib/sisu/v0/dal.rb | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v0/composite.rb b/lib/sisu/v0/composite.rb index 21b6781b..9b3689c3 100644 --- a/lib/sisu/v0/composite.rb +++ b/lib/sisu/v0/composite.rb @@ -190,13 +190,10 @@ module SiSU_Assemble tell=SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',@opt.fns) tell.grey_title_hi unless @opt.cmd =~/q/ para=data.each do |para| - if para =~/^r\{(.+?)\}/ \ - or para =~/^(?:<<\s*)\{(.+?)\}(?:req(?:quire)?\b|\s*\})?/ \ + if para =~/^<<\s+(\S+?\.ss[it])$/ \ + or para =~/^<<\{(\S+?\.ss[it])\}$/ \ or para =~/^(?:<<\s*)\|(\S+?)\|@\|.+?\|(?:req(?:quire)?\b|\s*\})?/ \ - or para =~/^(?:<<\s*)<(?:URL|url):(\S+?)>(?:req(?:require)\b|\s*\})?/ \ - or para =~/^\{(.+?)\}(?:req(?:require)?)\b/ \ - or para =~/^\|(\S+?)\|@\|.+?\|(?:req(?:require)?)\b/ \ - or para =~/^<(?:URL|url):(\S+?)>(?:req(?:require))\b/ + or para =~/^r\{(.+?)\}/ #depreciated loadfile=$1.strip tell=SiSU_Screen::Ansi.new(@opt.cmd,'loading:',loadfile) tell.txt_grey if @opt.cmd =~/[MVv]/ diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb index c5a07f9c..3e5e11ac 100644 --- a/lib/sisu/v0/dal.rb +++ b/lib/sisu/v0/dal.rb @@ -370,8 +370,8 @@ module SiSU_DAL def expand_insertions?(data) tuned_file,tuned_file_tmp=[],[] data.each do |para| - if para !~/^%+\s/ and - para =~/\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]*))\]\}(?:\.\.\/\S+?\/|\S+?\.ss[tm]\b)/ + if para !~/^%+\s/ \ + and para =~/\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]*))\]\}(?:\.\.\/\S+?\/|\S+?\.ss[tm]\b)/ txt,cmd,source,url_dir,note,manifest=nil,nil,nil,nil,nil,nil @u=SiSU_Env::Info_env.new.url if defined? @u.remote -- cgit v1.2.3