Skip to content

Commit

Permalink
Small improvements in docs' examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmihajlovski committed Feb 18, 2015
1 parent 475f5f1 commit f0bc122
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Expand Up @@ -124,7 +124,7 @@ private static void generateIndex(String path, int examplesN) {

snippet = col(rr, snippet);

snippet = snippet.replaceAll("\n(.*)\\s//\\shere", "\n<span class=\"important-code\">$1</span>");
snippet = snippet.replaceAll("\n(\\s*)(.*)\\s//\\shere", "\n$1<span class=\"important-code\">$2</span>");

String example = UTILS.fillIn(egT, "n", i + "");
example = UTILS.fillIn(example, "code", snippet);
Expand Down
Expand Up @@ -44,7 +44,7 @@ public void init() {
}

Object content() {
return grid(Movie.class); // here
return grid(Movie.class).orderBy("year"); // here
}
}

Expand Down
10 changes: 5 additions & 5 deletions rapidoid-docs/src/main/java/org/rapidoid/docs/eg2/App.java
Expand Up @@ -33,11 +33,11 @@ public static void main(String[] args) {
}

class HomeScreen { // here
String content() { // here
Object content() { // here
return "At the Home screen!"; // here
} // here
} // here
}
}

class FooScreen { // here
String content = "At the Foo screen!"; // here
} // here
Object content = "At the Foo screen!"; // here
}
4 changes: 2 additions & 2 deletions rapidoid-docs/src/main/resources/docs-template.html
Expand Up @@ -131,8 +131,8 @@ <h3 class="caption"><a id="quickstart"></a>Quick start</h3>
<pre id="example1-code" class="eg_code">
<span class="important-code"><span class="_code_kw">public</span> <span class="_code_kw">class</span> <span class="_code_cls">App</span> {</span>

<span class="important-code"> <span class="_code_kw">public</span> <span class="_code_cls">String</span> title = <span class="_code_str">"Example 1"</span>;</span>
<span class="important-code"> <span class="_code_kw">public</span> <span class="_code_cls">String</span> content = <span class="_code_str">"Hello, world!"</span>;</span>
<span class="important-code"><span class="_code_kw">public</span> <span class="_code_cls">String</span> title = <span class="_code_str">"Example 1"</span>;</span>
<span class="important-code"><span class="_code_kw">public</span> <span class="_code_cls">String</span> content = <span class="_code_str">"Hello, world!"</span>;</span>

<span class="_code_kw">public</span> <span class="_code_kw">static</span> <span class="_code_kw">void</span> main(<span class="_code_cls">String</span>[] args) {
<span class="_code_cls">Apps</span>.run(args);
Expand Down

0 comments on commit f0bc122

Please sign in to comment.