pagedown-rails 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 022c7ee521000c685c02c323c9fb44a6bd875b65
4
- data.tar.gz: 26df35a3e204a1ffce52d8b12b3304e3ca5276a7
3
+ metadata.gz: 75cd62659ed5e3b72b73777bb2a03558b4b08b25
4
+ data.tar.gz: 1ee4cf5b3065247758fa7d25fb43b25003ff9745
5
5
  SHA512:
6
- metadata.gz: b608d6ba183f510e6bd08adcfcc6c6a6a2868e5a67cf8ce35f471f7415a495e152df3aa19057da3d482f760db78ff3afc46acd43c7e08a20d9ef9837bbbd2d93
7
- data.tar.gz: c855cb813afdd0029b84088b5c9d4fbc0eed6362a99a1884ca18dfd3c7fee94f210a64d271b94e30ee563692c89a2bfdc19c61a0a89d0f83bf22616fa6059e21
6
+ metadata.gz: e614e6fef876b9dbd9091000796b970e8d30967a8644278912e8eb137eb6559e72c427e4fa1851c8d04b1cc0aa335004782fe69a5138c3ca75cc696be19ea890
7
+ data.tar.gz: 08066a89875b7c196e493ce72bae186f30c6d2c5d512303895ea3e5c36e6f417610dd04066bf9e9b82de55e2d060e90cfe88a2b4bc32d6b4c16cc0318ba47f6b
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  Add this line to the assets group in your Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'pagedown-rails', '~> 1.1.3'
10
+ gem 'pagedown-rails', '~> 1.1.4'
11
11
  ```
12
12
 
13
13
  Add the necessary libraries to `app/assets/javascripts/application.js`:
@@ -1,5 +1,5 @@
1
1
  module PageDown
2
2
  module Rails
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@
10
10
  nav = window.navigator,
11
11
  SETTINGS = { lineLength: 72 },
12
12
 
13
- // Used to work around some browser bugs where we can't use feature testing.
13
+ // Used to work around some browser bugs where we can't use feature testing.
14
14
  uaSniffed = {
15
15
  isIE: /msie/.test(nav.userAgent.toLowerCase()),
16
16
  isIE_5or6: /msie 6/.test(nav.userAgent.toLowerCase()) || /msie 5/.test(nav.userAgent.toLowerCase()),
@@ -111,7 +111,10 @@
111
111
  * its own image insertion dialog, this hook should return true, and the callback should be called with the chosen
112
112
  * image url (or null if the user cancelled). If this hook returns false, the default dialog will be used.
113
113
  */
114
-
114
+ hooks.addFalse("insertLinkDialog"); /* called with one parameter: a callback to be called with the URL of the link. If the application creates
115
+ * its own link insertion dialog, this hook should return true, and the callback should be called with the chosen
116
+ * link url (or null if the user cancelled). If this hook returns false, the default dialog will be used.
117
+ */
115
118
  this.getConverter = function () { return markdownConverter; }
116
119
 
117
120
  var that = this,
@@ -1781,7 +1784,8 @@
1781
1784
  ui.prompt(this.getString("imagedialog"), imageDefaultText, linkEnteredCallback);
1782
1785
  }
1783
1786
  else {
1784
- ui.prompt(this.getString("linkdialog"), linkDefaultText, linkEnteredCallback);
1787
+ if (!this.hooks.insertLinkDialog(linkEnteredCallback))
1788
+ ui.prompt(this.getString("linkdialog"), linkDefaultText, linkEnteredCallback);
1785
1789
  }
1786
1790
  return true;
1787
1791
  }
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  // (tags that can be opened/closed) | (tags that stand alone)
23
- var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i|kbd|li|ol|p|pre|s|sup|sub|strong|strike|ul)>|<(br|hr)\s?\/?>)$/i;
23
+ var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|h4|h5|h6|i|kbd|li|ol|p|pre|s|sup|sub|strong|strike|ul)>|<(br|hr)\s?\/?>)$/i;
24
24
  // <a href="url..." optional title>|</a>
25
25
  var a_white = /^(<a\shref="((https?|ftp):\/\/|\/)[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)]+"(\stitle="[^"<>]+")?\s?>|<\/a>)$/i;
26
26
 
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagedown-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Hubers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-18 00:00:00.000000000 Z
11
+ date: 2015-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>'
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>'
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
27
  description: PageDown for the Rails asset pipeline
@@ -31,16 +31,16 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - README.md
35
+ - lib/pagedown-rails.rb
36
+ - lib/pagedown/rails.rb
34
37
  - lib/pagedown/rails/engine.rb
35
38
  - lib/pagedown/rails/version.rb
36
- - lib/pagedown/rails.rb
37
- - lib/pagedown-rails.rb
38
39
  - vendor/assets/images/markdown-buttons.png
39
40
  - vendor/assets/javascripts/markdown.converter.js
40
41
  - vendor/assets/javascripts/markdown.editor.js
41
42
  - vendor/assets/javascripts/markdown.sanitizer.js
42
43
  - vendor/assets/stylesheets/markdown.css.erb
43
- - README.md
44
44
  homepage: http://github.com/rh/pagedown-rails
45
45
  licenses:
46
46
  - MIT
@@ -51,17 +51,17 @@ require_paths:
51
51
  - lib
52
52
  required_ruby_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.0.3
64
+ rubygems_version: 2.4.5
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: This gem makes PageDown available in the Rails asset pipeline