soywiki 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -11,5 +11,4 @@ wiki/
11
11
  soywiki.html
12
12
  wiki2/
13
13
  responses/
14
- *.gem
15
14
 
data/README.markdown CHANGED
@@ -497,26 +497,19 @@ SoyWiki is very new, so there are kinks and bugs to iron out and lot of
497
497
  desirable features to add. If you have a bug to report or a good feature to
498
498
  suggest, please file it on the [issue tracker][1]. That will help a lot.
499
499
 
500
- [1]:https://github.com/0robustus1/soywiki/issues
500
+ [1]:https://github.com/danchoi/soywiki/issues
501
501
 
502
502
  You can also join the [Google Group][group] and comment there.
503
503
 
504
504
  [group]:http://groups.google.com/group/soywiki-users?msg=new&lnk=gcis
505
505
 
506
- ## How to contact the developer
506
+ ## Maintainer
507
507
 
508
- My name is Daniel Choi. I am based in Cambridge, Massachusetts, USA, and you
509
- can email me at dhchoi {at} gmail.com.
508
+ The original version of Soywiki was created by Daniel Choi (email: dhchoi at gmail.com).
510
509
 
511
- ## Maintainer of project
510
+ Soywiki is now being maintained and extended by Tim r. Reddehase (github: [@0robustus1][tim]).
512
511
 
513
- Since Daniel doesn't have the time anymore, the project will be maintained
514
- by Tim Reddehase. You can contact me via email at
515
- robustus {at} rightsrestricted.com.
512
+ [tim]:https://github.com/0robustus1
516
513
 
517
- This also means, that current development and changes will be done
518
- from my [fork][2] at github.
519
-
520
- [2]: https://github.com/0robustus1/soywiki
521
514
 
522
515
 
data/lib/soywiki/html.rb CHANGED
@@ -6,6 +6,7 @@ module Soywiki
6
6
 
7
7
  HTML_DIR = 'html-export'
8
8
  INDEX_PAGE_TEMPLATE = File.read(File.join(File.dirname(__FILE__), '..', 'index_template.html.haml'))
9
+ BROKEN_MARKDOWN_HYPERLINK = %r|\[([^\]]+)\]\(\[(#{HYPERLINK})\]\(\2\)\)|
9
10
 
10
11
  def self.href_wiki_links(text)
11
12
  text = text.gsub(WIKI_WORD) {|match|
@@ -20,9 +21,11 @@ module Soywiki
20
21
  end
21
22
 
22
23
  def self.href_hyperlinks(text)
23
- text = text.gsub(HYPERLINK) {|match|
24
- %{<a href="#{match}">#{match}</a>}
25
- }
24
+ substitute = if @markdown then '[\\0](\\0)' else '<a href="\\0">\\0</a>' end
25
+ text = text.gsub(HYPERLINK, substitute)
26
+ if @markdown
27
+ text = text.gsub(BROKEN_MARKDOWN_HYPERLINK, '[\\1](\\2)')
28
+ end
26
29
  return text
27
30
  end
28
31
 
@@ -35,13 +38,13 @@ module Soywiki
35
38
  text = text.split("\n")
36
39
 
37
40
  title = text.shift || ''
38
- body = if text.empty?
39
- ''
40
- elsif @markdown
41
- RDiscount.new(text.join("\n").strip).to_html.gsub("<pre><code>","<pre><code>\n")
42
- else
43
- process(text.join("\n").strip)
44
- end
41
+ body = ''
42
+ if not text.empty?
43
+ body = self.process(text.join("\n").strip)
44
+ if @markdown
45
+ body = RDiscount.new(body).to_html.gsub("<pre><code>","<pre><code>\n")
46
+ end
47
+ end
45
48
 
46
49
  page_template = if defined?(PAGE_TEMPLATE_SUB)
47
50
  PAGE_TEMPLATE_SUB
data/lib/soywiki.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'string_ext'
2
2
  module Template_Substitution; end
3
3
  module Soywiki
4
- VERSION = '0.9.5'
4
+ VERSION = '0.9.6'
5
5
  WIKI_WORD = /\b([a-z0-9][\w_]+\.)?[A-Z][a-z]+[A-Z0-9]\w*\b/
6
6
  HYPERLINK = %r|\bhttps?://[^ >)\n\]]+|
7
7
 
data/lib/soywiki.vim CHANGED
@@ -12,7 +12,7 @@ let mapleader = ','
12
12
 
13
13
  " This regex matches namedspaced WikiWords and unqualified WikiWords
14
14
  let s:wiki_link_pattern = '\C\m\<\([a-z0-9][[:alnum:]_]\+\.\)\?[A-Z][a-z]\+[A-Z0-9]\w*\>'
15
- let s:http_link_pattern = 'https\?:[^ >)\]]\+'
15
+ let s:http_link_pattern = '\v(https|http|file|):[^ >)\]]+\V'
16
16
  let s:wiki_or_web_link_pattern = '\C\<\([a-z0-9][[:alnum:]_]\+\.\)\?[A-Z][a-z]\+[A-Z0-9]\w*\>\|https\?:[^ >)\]]\+'
17
17
 
18
18
  let s:rename_links_command = 'soywiki-rename '
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soywiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-05 00:00:00.000000000 Z
12
+ date: 2013-08-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A personal and collaborative wiki for Vim users
15
15
  email: