Skip to content

Commit

Permalink
fixed #11, support .
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Nov 2, 2014
1 parent bc90339 commit 1cc84d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/data.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* 2000 this is **strong**, and __strong2__
* 2000 this is *em*, and _em2_
* 2000 this is ~delete~, and ~~delete2~~
* 2000 this is `code` and `another code`.

## @Memthon and #HashTags

Expand Down
2 changes: 2 additions & 0 deletions markline.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function parseMarkdown(markdown, meta){
var RE_STRONG = /(\*\*|__)(.*?)\1/g;
var RE_EM = /(\*|_)(.*?)\1/g;
var RE_DELETE = /(\~\~?)(.*?)\1/g;
var RE_CODE = /`([^`]+)`/g
var RE_MENTION = /(^|[^a-zA-Z0-9])@([^\s\t,\(\)\[\]\{\}]+)/g;
var RE_MENTION_PLACEHOLDER = /\{@mention\}/ig;
var RE_HASHTAG = /(?:^|[\s\t])\#([^\s\t]+)/g;
Expand All @@ -78,6 +79,7 @@ function parseMarkdown(markdown, meta){
html = html.replace(RE_STRONG, '<strong>$2</strong>');
html = html.replace(RE_EM, '<em>$2</em>');
html = html.replace(RE_DELETE, '<del>$2</del>');
html = html.replace(RE_CODE, '<code>$1</code>');

// mention:
if (meta.mention) {
Expand Down
9 changes: 9 additions & 0 deletions timeline.css
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@
font-style: italic;
color: #999;
}
.markline > section > .events code {
font-size: 13px;
color: rgba(0, 0, 0, 0.75);
background-color: #999;
padding: 1px 3px;
border-radius: 3px;
margin-left: 3px;
margin-right: 3px;
}
.markline > section > .events a {
color: #6EA3D0;
text-decoration: none;
Expand Down

0 comments on commit 1cc84d8

Please sign in to comment.