card-mod-format 0.13.2 → 0.13.3

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
  SHA256:
3
- metadata.gz: 0b5eba52fcc743e248f18a00a831e82ff2c26c7b39971e4cbf51157e526e570c
4
- data.tar.gz: c384fb08ea3a69ee0403ce37f3f388b2ec70bc31af3152158d4feff719f4b702
3
+ metadata.gz: d6bc5c14f0ec7df2e36dd111eacec69023ac27fc017250594a312838f8431c5a
4
+ data.tar.gz: 3f9a6b4ff18f3abe16a46a0de6c3636d73a246addbc52c2ff489a038dcbacfa0
5
5
  SHA512:
6
- metadata.gz: 49e90f15050ccc0b22bc8cb36785c0e97c0ae92ba1f973db21dba261e4d175f5af39fc2af944aea7bb90fc0347062c59e70ce5bbf5ace98230e78728b53c29d0
7
- data.tar.gz: caed17f4e4161215445a67e0f9a15ed38dd772b54ea1deb909935211446c965d0fb239f037e87c8a5d7815619f9360790d024456b09d8a574a2db4ea5fddb7ae
6
+ metadata.gz: fa560ad5e026d85d61da079fce1fadfabe9a7529c6ad421dfa61e6572ba82e9823e81393c0d875268ee6a5b2a011130ef46ee927f2fa75d0589aef7d087658d3
7
+ data.tar.gz: 74238ca4571c1957a26d354f2f71129a39f21a1ed491f37c40c16c9ab35888172876789ed811fc50118dea47a17fe7870ec96b2fb267d9fa0db9619bd41da981
data/lib/card/path.rb CHANGED
@@ -35,7 +35,8 @@ class Card
35
35
  end
36
36
 
37
37
  def standard
38
- base + extension + query
38
+ anch = anchor
39
+ base + extension + query + anch
39
40
  end
40
41
 
41
42
  def base
@@ -75,6 +76,11 @@ class Card
75
76
  extension ? ".#{extension}" : ""
76
77
  end
77
78
 
79
+ def anchor
80
+ anchor = opts.delete :anchor
81
+ anchor ? "##{anchor}" : ""
82
+ end
83
+
78
84
  def query
79
85
  query_opts = cast_path_hash opts
80
86
  query_opts.empty? ? "" : "?#{query_opts.to_param}"
data/set/all/head.rb CHANGED
@@ -7,11 +7,6 @@ format do
7
7
  end
8
8
 
9
9
  format :html do
10
- # add tuples containing a
11
- # - the codename of a card with javascript config (usually in json format)
12
- # - the name of a javascript method that handles the config
13
- basket :mod_js_config
14
-
15
10
  view :head, unknown: true, perms: :none do
16
11
  views_in_head.map { |viewname| render viewname }.flatten.compact.join "\n"
17
12
  end
data/set/all/html_show.rb CHANGED
@@ -13,7 +13,7 @@ format :html do
13
13
  def show_without_page_layout view, args
14
14
  @main = true if params[:is_main] || args[:main]
15
15
  args.delete(:layout)
16
- view ||= args[:home_view] || :open # default_nest_view
16
+ view ||= args[:home_view] || default_page_view
17
17
  render! view, args
18
18
  end
19
19
 
File without changes
File without changes
data/set/all/text.rb CHANGED
@@ -1,8 +1,25 @@
1
1
  require "htmlentities"
2
2
 
3
+ format do
4
+ def to_text html
5
+ HTMLEntities.new.decode strip_tags(html).to_s
6
+ end
7
+
8
+ def nestless_content
9
+ content_obj = content_object card.content
10
+ content_obj.strip_nests
11
+ content_obj.process_chunks
12
+ content_obj.to_s
13
+ end
14
+
15
+ view :text_without_nests do
16
+ to_text nestless_content
17
+ end
18
+ end
19
+
3
20
  format :text do
21
+ # TODO: override this in cards without html content
4
22
  view :core do
5
- HTMLEntities.new.decode strip_tags(super()).to_s
6
- # need this string method to get out of html_safe mode
23
+ to_text super()
7
24
  end
8
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-08-06 00:00:00.000000000 Z
13
+ date: 2021-09-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.103.2
21
+ version: 1.103.3
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.103.2
28
+ version: 1.103.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-content
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.13.2
35
+ version: 0.13.3
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.13.2
42
+ version: 0.13.3
43
43
  description: ''
44
44
  email:
45
45
  - info@decko.org
@@ -74,14 +74,14 @@ files:
74
74
  - set/all/head.rb
75
75
  - set/all/header.rb
76
76
  - set/all/header/header_wrap.haml
77
- - set/all/html_content.rb
78
- - set/all/html_content/labeled.haml
79
77
  - set/all/html_error.rb
80
78
  - set/all/html_error/debug_server_error.haml
81
79
  - set/all/html_error/not_found.haml
82
80
  - set/all/html_error/server_error.haml
83
81
  - set/all/html_show.rb
84
82
  - set/all/html_title.rb
83
+ - set/all/html_views.rb
84
+ - set/all/html_views/labeled.haml
85
85
  - set/all/html_wrapper.rb
86
86
  - set/all/js.rb
87
87
  - set/all/json.rb