all repos — hastyscribe @ 50ccba2fa4d0ecd5d59723edcbf1a39168aa32b4

A professional markdown compiler.

Fixed errors and warnings thrown by nim 0.12.0
h3rald h3rald@h3rald.com
Sun, 22 Nov 2015 13:47:16 +0100
commit

50ccba2fa4d0ecd5d59723edcbf1a39168aa32b4

parent

1d16eead705896e10b5f0e3050640faba8e12811

3 files changed, 13 insertions(+), 9 deletions(-)

jump to
M hastyscribe.nimhastyscribe.nim

@@ -2,6 +2,7 @@ import

os, parseopt2, strutils, + sequtils, times, pegs, base64,

@@ -86,7 +87,7 @@ if (file.existsFile):

let contents = file.readFile return encode_image(contents, format) else: - stderr.writeln("Warning: image '" & file & "' not found.") + stderr.writeLine("Warning: image '" & file & "' not found.") return file proc encode_font*(font, format: string): string =

@@ -114,9 +115,9 @@ elif imgfile.startsWith(peg"http[s]?'://'"):

try: imgcontent = encode_image(getContent(imgfile, timeout = 5000), imgformat) except: - stderr.writeln "Warning: Unable to download '" & imgfile & "'" - stderr.writeln " Reason: " & getCurrentExceptionMsg() - stderr.writeln " -> Image will be linked instead" + stderr.writeLine "Warning: Unable to download '" & imgfile & "'" + stderr.writeLine " Reason: " & getCurrentExceptionMsg() + stderr.writeLine " -> Image will be linked instead" continue else: imgcontent = encode_image_file(current_dir & imgfile, imgformat)

@@ -178,7 +179,7 @@ var matches:TSnippet

discard snippet.match(peg_snippet, matches) var id = matches[0].strip if snippets[id] == nil: - stderr.writeln "Warning: Snippet '" & id & "' not defined." + stderr.writeLine "Warning: Snippet '" & id & "' not defined." doc = doc.replace(snippet, "") else: doc = doc.replace(snippet, snippets[id])

@@ -287,7 +288,10 @@ of "user-css":

user_css = val of "output-file": output_file = val - else: discard + else: + discard + else: + discard if input == "": quit(usage, 1)
M hastyscribe.nimblehastyscribe.nimble

@@ -1,6 +1,6 @@

[Package] name = "hastyscribe" -version = "1.1.3" +version = "1.1.4" author = "Fabio Cevasco" description = "Self-contained markdown compiler generating self-contained HTML documents" license = "MIT"

@@ -44,4 +44,4 @@ vendor/libmarkdown_linux_arm.a

""" [Deps] -Requires: "nimrod >= 0.11.2" +Requires: "nimrod >= 0.12.0"
M version.nimversion.nim

@@ -1,1 +1,1 @@

-let v* = "1.1.3" +let v* = "1.1.4"