phlex-markdown 0.1.0 → 0.2.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: 9decdb08e89ad1d8deb79e6782b7961102150af4e6e20e0dff67a4ea7ff6c6d7
4
- data.tar.gz: 50e51626d52911b3ddb2f31404ede909bdea835b230dff35ed9d4592d6ea1cc9
3
+ metadata.gz: 70814edaf961f6b8b86c4918d06a92cb9d9d890dd7614dea761a03982b0ff8ce
4
+ data.tar.gz: 5fc9e240f463805e88d718f5b1fe5ce2a9d099367cac196288b68657bd895505
5
5
  SHA512:
6
- metadata.gz: a09c726ac8e02922efd62342038ebe87abdb107c1729881d0998665d5a6b7147f41294140c6e26b5342a6c56c1b4cca4c9aaf1f399480a0d95caf947d12036da
7
- data.tar.gz: 1736bc45133d4336846c8accb29128e27ae9499550ebad59287624a99c2cd09d33b268c95999d670f22300f518e46788c4a8da6cd7a583066c14ccb7d6dcc84f
6
+ metadata.gz: cf89b40b70e6d5fe0ed463e7756b6ba9f236eb95c1a23a6786e43df0f992bcf2d10f03c1dda23ec63f10058256e0c5704c35269a2bdd941a0f110fb3110cbdc5
7
+ data.tar.gz: 56f39bdc50391a200f938a841637618d406eee64ea2d3e217dbc12b6636a4b0fe06d2bd58285de1cdf1980b35737be4528b5fc19113e18157c209136dfc21997
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
6
  gemspec
7
7
 
8
+ gem "phlex", github: "joeldrapper/phlex"
8
9
  gem "capybara"
9
10
  gem "rubocop"
10
11
  gem "solargraph"
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "phlex"
3
4
  require "markly"
4
5
 
5
6
  module Phlex
@@ -44,7 +45,13 @@ module Phlex
44
45
  p { visit_children(node) }
45
46
  end
46
47
  in :link
47
- a(href: node.url) { visit_children(node) }
48
+ a(href: node.url, title: node.title) { visit_children(node) }
49
+ in :image
50
+ img(
51
+ src: node.url,
52
+ alt: node.each.first.string_content,
53
+ title: node.title
54
+ )
48
55
  in :emph
49
56
  em { visit_children(node) }
50
57
  in :strong
@@ -57,10 +64,14 @@ module Phlex
57
64
  in :list_item
58
65
  li { visit_children(node) }
59
66
  in :code
60
- whitespace { code { text(node.string_content) } }
67
+ code { text(node.string_content) }
61
68
  in :code_block
62
69
  code_block(node.string_content, language: node.fence_info) do |**attributes|
63
- pre(**attributes) { text(node.string_content) }
70
+ pre(**attributes) do
71
+ code(class: "language-#{node.fence_info}") do
72
+ text(node.string_content)
73
+ end
74
+ end
64
75
  end
65
76
  in :hrule
66
77
  hr
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Drapper
@@ -53,8 +53,6 @@ files:
53
53
  - README.md
54
54
  - SECURITY.md
55
55
  - lib/phlex/markdown.rb
56
- - lib/phlex/markdown/version.rb
57
- - sig/phlex.rbs
58
56
  homepage: https://github.com/joeldrapper/phlex-markdown
59
57
  licenses:
60
58
  - MIT
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Phlex
4
- class Markdown
5
- VERSION = "0.1.0"
6
- end
7
- end
data/sig/phlex.rbs DELETED
@@ -1,4 +0,0 @@
1
- module Phlex
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end