burp_cms 1.3.24 → 1.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36691603503a5b487838811a8380de8608052e65
4
- data.tar.gz: 14c6b4def402ea65a1982815e6086572c7d6f34d
3
+ metadata.gz: ed615d486714291ab993290435dc7a948f8c0190
4
+ data.tar.gz: edd65099cd707f974fdea78075aded81c1cf17e3
5
5
  SHA512:
6
- metadata.gz: 0363db07af248f7350002794df36fec8cb872c99a3a1501c858ff7a4eed5e5dd90a76eb8c79ce9b6566d523ba5f3b7fd6f0de4ab337c57dd7be4c2d18ac87040
7
- data.tar.gz: ce2a2966eadf6530779a27185be4f7c401bfb6d4bdcd8bb810d80083896f48788ac5c3404ee279c0073eaeb4e4ad8bbd3a3e348cf4384e2cf71c060c2ac60084
6
+ metadata.gz: cf44b81ab7a338e222b8154239def5c59e9fc996854ae8cbd1dd46fcd5965582fd00d16f154b05008c217f1428101d493fd102e91e26bf4e1d01fcd0c35505b3
7
+ data.tar.gz: e6bba0e59ae5cdc2a4e9b8481f498784074fb53ac60961bacf3d60834ed9c4d059634dc7754acac091e53bc00566e12b6523e09d22af1d19de2d9a5672b21cc1
@@ -53,7 +53,7 @@ function Html2Markdown(value) {
53
53
  }
54
54
  });
55
55
 
56
- dom.find("em > strong").each(function() {
56
+ dom.find("> p > em > strong").each(function() {
57
57
  $(this).replaceWith("**"+$(this).html()+"**");
58
58
  });
59
59
 
@@ -75,24 +75,11 @@ function Html2Markdown(value) {
75
75
  }
76
76
  });
77
77
 
78
- dom.find("ul").each(function() {
79
- if(!shouldSkip(this)) {
80
- $(this).contents().each(function() {
81
- if(this.nodeType === 3) {
82
- $(this).remove();
83
- }
84
- });
85
-
86
- $(this).find('li').each(function() {
87
- removeTralingWhiteSpace($(this).get(0).previousSibling);
88
- $(this).replaceWith(getBeforePadding(this,"\n") + "- "+$(this).html() + getAfterPadding(this,"\n"));
89
- });
90
-
91
- $(this).replaceWith(getBeforePadding(this,"\n\n") + $(this).html() + getAfterPadding(this,"\n\n"));
78
+ dom.find("> ol, > ul").each(function() {
79
+ if($(this).find('li li').length > 0) {
80
+ return;
92
81
  }
93
- });
94
-
95
- dom.find("ol").each(function() {
82
+
96
83
  if(!shouldSkip(this)) {
97
84
 
98
85
  $(this).contents().each(function() {
@@ -101,15 +88,18 @@ function Html2Markdown(value) {
101
88
  }
102
89
  });
103
90
 
104
- $(this).find('li').each(function(index,value) {
91
+ var isOL = $(this).is("ol");
92
+
93
+ $(this).find('li').each(function(index, value) {
94
+ var listIndicator = isOL ? String(index+1) + "." : "-";
105
95
  removeTralingWhiteSpace($(this).get(0).previousSibling);
106
- $(this).replaceWith(getBeforePadding(this,"\n")+(index+1)+". "+$(this).html()+getAfterPadding(this,"\n"));
96
+ $(this).replaceWith(getBeforePadding(this,"\n")+listIndicator+" "+$(this).html()+getAfterPadding(this,"\n"));
107
97
  });
108
- $(this).replaceWith(getBeforePadding(this,"\n\n")+$(this).html());
98
+ $(this).replaceWith(getBeforePadding(this,"\n\n") + $(this).html() + getAfterPadding(this,"\n\n"));
109
99
  }
110
100
  });
111
101
 
112
- dom.find('blockquote').each(function() {
102
+ dom.find('> blockquote').each(function() {
113
103
  if(!shouldSkip(this)) {
114
104
  $(this).replaceWith("> "+$.trim($(this).html()).replace(/\n{2,20}/g,"\n\n").replace(/\n/g,'\n> ').replace(/> \n/g,">\n"));
115
105
  }
data/lib/burp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Burp
2
- VERSION = "1.3.24"
2
+ VERSION = "1.3.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burp_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.24
4
+ version: 1.3.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darwin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-10 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails