SCM

SCM Repository

[inlinedocs] Diff of /pkg/inlinedocs/R/parsers.R
ViewVC logotype

Diff of /pkg/inlinedocs/R/parsers.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 102, Fri May 14 18:48:40 2010 UTC revision 104, Tue May 18 16:35:08 2010 UTC
# Line 67  Line 67 
67                   "((?:\\n###[^\\n]*)+)",#comment value lines \\1                   "((?:\\n###[^\\n]*)+)",#comment value lines \\1
68                   "([\\w\\W]*)[}]",#examples \\2                   "([\\w\\W]*)[}]",#examples \\2
69                   sep="")                   sep="")
70           SEP <- "----------"           SEP <- "-/-/-/-/-=====-----"
71           REP <- paste("\\1",SEP,"\\2",sep="")           REP <- paste("\\1",SEP,"\\2",sep="")
72           r <- strsplit(gsub(FIND,REP,after,perl=TRUE),split=SEP)[[1]]           r <- strsplit(gsub(FIND,REP,after,perl=TRUE),split=SEP)[[1]]
73           l <- strsplit(r,split="\n")           l <- strsplit(r,split="\n")
          if(length(l)<2||l[[2]]=="")return(list())  
74           excode <- c(l[[2]],"")           excode <- c(l[[2]],"")
75             if(length(l)<2||paste(excode,collapse="")=="")return(list())
76           prefixes <- gsub("(\\s*).*","\\1",excode,perl=TRUE)[grep("\\w",excode)]           prefixes <- gsub("(\\s*).*","\\1",excode,perl=TRUE)[grep("\\w",excode)]
77           FIND <- prefixes[which.min(nchar(prefixes))]           FIND <- prefixes[which.min(nchar(prefixes))]
78           list(examples=paste(sub(FIND,"",excode),collapse="\n"),           list(examples=paste(sub(FIND,"",excode),collapse="\n"),

Legend:
Removed from v.102  
changed lines
  Added in v.104

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge