Skip to content

Commit 12e4c37

Browse files
committed
Merge pull request #26 from retronym/release/2.10.3-markdown-prettify
Release/2.10.3 markdown prettify
2 parents b9b7f3c + abf07cc commit 12e4c37

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

hand-written.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Since 2.10.3 is strictly a bug-fix release, here's an overview of the most promi
5757
* See the [actors migration project](http://docs.scala-lang.org/actors-migration/) for more information.
5858
* Performance Improvements
5959
* Faster inliner
60-
* `Range#sum is now O(1)
60+
* `Range#sum` is now O(1)
6161
* Update of ForkJoin library
6262
* Fixes in immutable `TreeSet`/`TreeMap`
6363
* Improvements to PartialFunctions

release-notes.html

Lines changed: 6 additions & 8 deletions
Large diffs are not rendered by default.

src/main/scala/GitInfo.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
case class Commit(sha: String, author: String, header: String, body: String) {
3+
def trimmedHeader = header.take(80)
34
override def toString = " * " + sha + " (" + author + ") " + header + " - " + body.take(5) + " ..."
45
}
56

@@ -75,7 +76,7 @@ class GitInfo(gitDir: java.io.File, val previousTag: String, val currentTag: Str
7576
sb append header4("Complete commit list!")
7677
sb append targetLanguage.tableHeader("sha", "Title")
7778
for (commit <- commits)
78-
sb append targetLanguage.tableRow(commitShaLink(commit.sha), commit.header)
79+
sb append targetLanguage.tableRow(commitShaLink(commit.sha), commit.trimmedHeader)
7980
sb append targetLanguage.tableEnd
8081
sb.toString
8182
}
@@ -86,7 +87,7 @@ class GitInfo(gitDir: java.io.File, val previousTag: String, val currentTag: Str
8687
sb append header4(s"Commits and the issues they fixed since ${previousTag}")
8788
sb append targetLanguage.tableHeader("Issue(s)", "Commit", "Message")
8889
for (commit <- fixCommits)
89-
sb append targetLanguage.tableRow(fixLinks(commit), commitShaLink(commit.sha), commit.header)
90+
sb append targetLanguage.tableRow(fixLinks(commit), commitShaLink(commit.sha), commit.trimmedHeader)
9091
sb append targetLanguage.tableEnd
9192
sb append blankLine()
9293
sb.toString

src/main/scala/MakeReleaseNotes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ object MakeReleaseNotes {
3939
} else Nil
4040
// if you don't have the next line, sub-bullets would be screwed!
4141
// please take this case into account and comment out 2 next lines and uncomment the line after!
42-
val newLines = lines.map(x => if (x.startsWith(" *")) "\n" + x else x)
42+
val newLines = lines.map(x => if (x.startsWith(" *")) "\n" + x.stripPrefix(" ") else x)
4343
newLines.mkString("\n")
4444
// lines.mkString("\n")
4545
}

src/main/scala/TargetLanguage.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sealed trait TargetLanguage {
1010
}
1111
case object MarkDown extends TargetLanguage {
1212
def createHyperLink(link: String, content: String): String =
13-
s"[$link]($content)"
13+
s"[$content]($link)"
1414
def blankLine(): String = "\n"
1515
def header4(msg: String): String = s"#### $msg\n"
1616
def tableHeader(firstColumn: String, secondColumn: String): String =

0 commit comments

Comments
 (0)