Merge branch 'master' of https://github.com/Araq/Nimrod into vm2

Conflicts:
	web/news.txt
This commit is contained in:
Araq 2013-12-23 01:23:16 +01:00
commit b76729df1c
35 changed files with 1047 additions and 269 deletions

View file

@ -709,9 +709,11 @@ proc rfind*(s, sub: string, start: int = -1): int {.noSideEffect.} =
if result != -1: return
return -1
proc quoteIfContainsWhite*(s: string): string =
proc quoteIfContainsWhite*(s: string): string {.deprecated.} =
## returns ``'"' & s & '"'`` if `s` contains a space and does not
## start with a quote, else returns `s`
## DEPRECATED as it was confused for shell quoting function.
## For this application use osproc.quoteShell.
if find(s, {' ', '\t'}) >= 0 and s[0] != '"':
result = '"' & s & '"'
else: