From 0ccd0679fdfd13da34b0236361abbd149a42a777 Mon Sep 17 00:00:00 2001 From: Liang Sun Date: Tue, 27 Nov 2012 10:18:12 +0800 Subject: 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 "/". --- plugins/backtick_code_block.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/backtick_code_block.rb') diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb index 40e7900b..0e7cee41 100644 --- a/plugins/backtick_code_block.rb +++ b/plugins/backtick_code_block.rb @@ -2,7 +2,7 @@ require './plugins/pygments_code' module BacktickCodeBlock include HighlightCode - AllOptions = /([^\s]+)\s+(.+?)(https?:\/\/\S+)\s*(.+)?/i + AllOptions = /([^\s]+)\s+(.+?)(https?:\/\/\S+|\/\S+)\s*(.+)?/i LangCaption = /([^\s]+)\s*(.+)?/i def render_code_block(input) @options = nil -- cgit v1.2.1 From c18de558759dff2c77e6e0fc3ce2ad7a9f3fea99 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Wed, 26 Dec 2012 17:18:29 -0600 Subject: Titles in code plugins can have slashes in them. Closes #892 --- plugins/backtick_code_block.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/backtick_code_block.rb') diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb index 0e7cee41..8e2c1141 100644 --- a/plugins/backtick_code_block.rb +++ b/plugins/backtick_code_block.rb @@ -2,7 +2,7 @@ require './plugins/pygments_code' module BacktickCodeBlock include HighlightCode - AllOptions = /([^\s]+)\s+(.+?)(https?:\/\/\S+|\/\S+)\s*(.+)?/i + AllOptions = /([^\s]+)\s+(.+?)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i LangCaption = /([^\s]+)\s*(.+)?/i def render_code_block(input) @options = nil -- cgit v1.2.1