Browse code

To support url without domain name like /path/file

You need to know if you would like to support this, each word in the title can not start with "/".

Liang Sun authored on 27/11/2012 at 02:18:12
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@ require './plugins/pygments_code'
2 2
 
3 3
 module BacktickCodeBlock
4 4
   include HighlightCode
5
-  AllOptions = /([^\s]+)\s+(.+?)(https?:\/\/\S+)\s*(.+)?/i
5
+  AllOptions = /([^\s]+)\s+(.+?)(https?:\/\/\S+|\/\S+)\s*(.+)?/i
6 6
   LangCaption = /([^\s]+)\s*(.+)?/i
7 7
   def render_code_block(input)
8 8
     @options = nil