metadata_presenter 0.26.1 → 0.27.0

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: 77686ea03c30ac785d2bae9f53245e293cb931f58d4232d0ba5b008a5a2f02f4
4
- data.tar.gz: 55604c471f10b5cd149980786c5724e8ae75395020eef1c51ba766c6ee14e377
3
+ metadata.gz: 4048587e07e7a5b2b4919a71d0183200b3f88068377b284a307ad917d1a30add
4
+ data.tar.gz: 4fb293d2eb67132d9f68b8da4f142847864d748a8a3e4dd1bb93151b327aab0a
5
5
  SHA512:
6
- metadata.gz: 73ec9782eb036f5e56e51032c2ef4b7dc82f42c28cbbfc089bde19db496b8c9aacb86a53332df151e012887bcffe01b57af378fcb9c219651926f6ebf699dae7
7
- data.tar.gz: 31bba52964b01be4872e83063f1665dc126ec705db0a6cba5c0ab7664db22b376a6c2a8f365457a3972e62e8e8464d7464a0edb798347e952384605c9c85e768
6
+ metadata.gz: 4110ca082033d1bbdbe271b70942c37b6bb0424d4202874e3016ab96c85d226bb8da432bdc63079918cd544ada93d869add4b45e2d961bf9c0272fc5ba4969ff
7
+ data.tar.gz: 146b09fa25fc4305b3193b0a932bff1b6846b4d8cf8bf55246b0fc5c01df55b7de41cb701d12f74aab38e365045edb0fd489a78175f7728ef967c363f81084df
@@ -6,15 +6,14 @@ module MetadataPresenter
6
6
  end
7
7
  end
8
8
 
9
- # Renders markdown given a text.
9
+ # Renders html given markdown.
10
10
  #
11
11
  # @example
12
- # <%=m '# Some markdown' %>
12
+ # <%=to_html '# Some markdown' %>
13
13
  #
14
- def m(text)
14
+ def to_html(text)
15
15
  Kramdown::Document.new(text).to_html.html_safe
16
16
  end
17
- alias_method :to_markdown, :m
18
17
 
19
18
  def default_text(property)
20
19
  MetadataPresenter::DefaultText[property]
@@ -3,6 +3,6 @@
3
3
  data-fb-content-id="page[body]"
4
4
  data-fb-content-type="content"
5
5
  data-fb-default-text="<%= default_text('body') %>">
6
- <%= to_markdown(@page.body) %>
6
+ <%= to_html(@page.body) %>
7
7
  </div>
8
8
  <%- end %>
@@ -1 +1 @@
1
- <%= to_markdown(component.html) %>
1
+ <%= to_html(component.content) %>
@@ -3,7 +3,7 @@
3
3
  <div class="govuk-grid-column-two-thirds">
4
4
  <% if @page.body %>
5
5
  <p class="govuk-body-l" data-block-id="<%= @page.id %>" data-block-property="body">
6
- <%= to_markdown(@page.body) %>
6
+ <%= to_html(@page.body) %>
7
7
  </p>
8
8
  <%- end %>
9
9
  <%= form_tag(reserved_answers_path, method: :post) do %>
@@ -20,7 +20,7 @@
20
20
  <div class="fb-editable"
21
21
  data-fb-content-id="page[before_you_start]"
22
22
  data-fb-content-type="content">
23
- <%= to_markdown(@page.before_you_start) %>
23
+ <%= to_html(@page.before_you_start) %>
24
24
  </div>
25
25
  <%- end %>
26
26
  </div>
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "_id": "component.content",
3
3
  "_type": "content",
4
- "html": "[Optional content]"
4
+ "content": "[Optional content]"
5
5
  }
@@ -2,6 +2,6 @@
2
2
  "section_heading": "[Optional section heading]",
3
3
  "lede": "[Optional lede paragraph]",
4
4
  "body": "[Optional content]",
5
- "html": "[Optional content]",
5
+ "content": "[Optional content]",
6
6
  "hint": "[Optional hint text]"
7
7
  }
@@ -330,7 +330,7 @@
330
330
  {
331
331
  "_id": "how-many-lights_content_1",
332
332
  "_type": "content",
333
- "html": "What lights?"
333
+ "content": "What lights?"
334
334
  }
335
335
  ],
336
336
  "url": "how-many-lights"
@@ -348,7 +348,7 @@
348
348
  {
349
349
  "_id": "check-answers_content_1",
350
350
  "_type": "content",
351
- "html": "Check yourself before you wreck yourself."
351
+ "content": "Check yourself before you wreck yourself."
352
352
  }
353
353
  ],
354
354
  "extra_components": []
@@ -365,7 +365,7 @@
365
365
  {
366
366
  "_id": "confirmation_content_1",
367
367
  "_type": "content",
368
- "html": "Some day I will be the most powerful Jedi ever!"
368
+ "content": "Some day I will be the most powerful Jedi ever!"
369
369
  }
370
370
  ]
371
371
  }
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '0.26.1'.freeze
2
+ VERSION = '0.27.0'.freeze
3
3
  end
@@ -11,7 +11,7 @@
11
11
  "_type": {
12
12
  "const": "content"
13
13
  },
14
- "html": {
14
+ "content": {
15
15
  "title": "Content",
16
16
  "description": "Content to display - use [markdown](https://www.gov.uk/guidance/how-to-publish-on-gov-uk/markdown) to format text or add hyperlinks",
17
17
  "type": "string",
@@ -25,6 +25,6 @@
25
25
  }
26
26
  ],
27
27
  "required": [
28
- "html"
28
+ "content"
29
29
  ]
30
30
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.1
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Online
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder