# HG changeset patch # User neko259 # Date 2013-05-30 17:38:23 # Node ID 0e0d3099ab4a8d85a7a3bcf9284f1d2279da7abd # Parent 4d743e53c29de08924105352efe7a956fa3fa58b #12 Fixed formatting of comments and links. Added a style for target post in the white theme. diff --git a/boards/mdx_neboard.py b/boards/mdx_neboard.py --- a/boards/mdx_neboard.py +++ b/boards/mdx_neboard.py @@ -53,11 +53,11 @@ class CommentPattern(Pattern): class NeboardMarkdown(markdown.Extension): - AUTOLINK_PATTERN = r'(http://\S+)' - QUOTE_PATTERN = r'(>){1}(.+)' + AUTOLINK_PATTERN = r'(https?://\S+)' + QUOTE_PATTERN = r'^(>){1}(.+)' REFLINK_PATTERN = r'((>){2}(\d+))' SPOILER_PATTERN = r'%%(.+)%%' - COMMENT_PATTERN = r'(//(.+))' + COMMENT_PATTERN = r'^(//(.+))' def extendMarkdown(self, md, md_globals): autolink = AutolinkPattern(self.AUTOLINK_PATTERN, md) diff --git a/boards/static/css/md/base_page.css b/boards/static/css/md/base_page.css --- a/boards/static/css/md/base_page.css +++ b/boards/static/css/md/base_page.css @@ -196,4 +196,8 @@ a:hover { .post:target { border: solid 2px white; +} + +pre{ + white-space:pre-wrap } \ No newline at end of file diff --git a/boards/static/css/sw/base_page.css b/boards/static/css/sw/base_page.css --- a/boards/static/css/sw/base_page.css +++ b/boards/static/css/sw/base_page.css @@ -211,4 +211,10 @@ a { .last-replies > .post:last-child { border-bottom: none; padding-bottom: 0; +} + +:target .post_id { + background: #182F6F; + color: #FFF; + text-decoration: none; } \ No newline at end of file