Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Ángel Díaz authored and Miguel Ángel Díaz committed Mar 26, 2019
2 parents 9198f53 + 346eba1 commit a1e3672
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
8 changes: 1 addition & 7 deletions bin/nef-jekyll
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,11 @@ if [ -f "$root/$mainPagePath" ]; then
fi

# 3. fix `sitePath`
if [ -d "$sitePath" ]; then
sitePath="$sitePath"
elif [ -d "$root/$sitePath" ]; then
if [ -d "$root/$sitePath" ]; then
sitePath="$root/$sitePath"
else
mkdir -p "$sitePath"
sitePath="$root/$sitePath"
fi

echo "$projectPath"
echo "$sitePath"
echo "$mainPagePath"

generateDocumentation "$projectPath" "$sitePath" "$mainPagePath"
12 changes: 6 additions & 6 deletions lib/Markup/Parser/MarkupLexical.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ struct LexicalAnalyzer {
// MARK: helpers
private enum Regex {
static let nef = (begin: "//[ ]*nef:begin:[a-z]+\n", end: "//[ ]*nef:end[ ]*\n")
static let multiMarkup = (begin: "/\\*:.*\n")
static let multiMarkup = "/\\*:.*\n"
static let markup = "^[ ]*//:.*\n"
static let comment = "^[ ]*//.*\n"
static let multiComment = (begin: "/\\*.*\n")
static let markupComment = (end: "\\*/\n")
static let multiComment = "/\\*.*\n"
static let markupComment = "\\*/\n"
static let line = ".*\n"
}

Expand All @@ -43,7 +43,7 @@ struct LexicalAnalyzer {
if let _ = line.substring(pattern: Regex.nef.end) {
return Token.nefEnd
}
if let markupBegin = line.substring(pattern: Regex.multiMarkup.begin) {
if let markupBegin = line.substring(pattern: Regex.multiMarkup) {
let description = markupBegin.ouput.clean("/*:", "\n").trimmingWhitespaces
return Token.markupBegin(description: description)
}
Expand All @@ -53,10 +53,10 @@ struct LexicalAnalyzer {
if let _ = line.substring(pattern: Regex.comment) {
return Token.comment
}
if let _ = line.substring(pattern: Regex.multiComment.begin) {
if let _ = line.substring(pattern: Regex.multiComment) {
return Token.commentBegin(delimiter: line)
}
if let _ = line.substring(pattern: Regex.markupComment.end) {
if let _ = line.substring(pattern: Regex.markupComment) {
return Token.markupCommentEnd(delimiter: line)
}

Expand Down
2 changes: 2 additions & 0 deletions markdown/JekyllMarkdown.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand Down Expand Up @@ -474,6 +475,7 @@
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down

0 comments on commit a1e3672

Please sign in to comment.