markly 0.5.1 → 0.5.2

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
  SHA256:
3
- metadata.gz: 3e93dc6c0b00fb75d248a8631c7861b90feaa4e34b0fc22ca743e3869f591d82
4
- data.tar.gz: 611f2ddb2a723f48575fdcde58ac778e44745d5162d580c7732bed05df529a1c
3
+ metadata.gz: 4da10bf65ae4145aa5ebb31764dd2316d3046edfd4fd943768b0a10792a25c59
4
+ data.tar.gz: db4ee042070865bbf43283fb51710728dd35df9bc503c72a9f31bad3de4bfe55
5
5
  SHA512:
6
- metadata.gz: 2bcb920927a44239587688f322891836d73b0c968ae3156776e578b3c80b8e288afd37b1a9f7dc7173852e4779dd22804d8b77e10db78c376cf7338e0883842f
7
- data.tar.gz: 4abdfbee670fbff858e1017b9329bcb429a698052d95a860d26dddea1f1ffac9377424aca614e4d39b12d3c4aae2dfceddfb082ebf7337d717f8a67ff38ef1a4
6
+ metadata.gz: be0c0d657e2e6b4d26f89b9c03f042aa0661e88cb295b76f518888fd2e490e55f58ef3b7292090c5a25d23027d6b370b9a582acb68ff4b326f1c784a90b0d5bc
7
+ data.tar.gz: 5cf044c518969df725a5822eb7974477d480926fa97d8b4bff71e2b628e70faa99107e60adadeef3377e157bac6d2ee200f9c6ede02da0beaff4c16a1929b5b3
@@ -1,7 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Loads mkmf which is used to make makefiles for Ruby extensions
3
4
  require 'mkmf'
4
5
 
5
- $CFLAGS << ' -std=c99'
6
+ $CFLAGS << " -O3 -std=c99"
6
7
 
7
- create_makefile('markly/markly')
8
+ gem_name = File.basename(__dir__)
9
+ extension_name = 'markly'
10
+
11
+ # The destination:
12
+ dir_config(extension_name)
13
+
14
+ # Generate the makefile to compile the native binary into `lib`:
15
+ create_makefile(File.join(gem_name, extension_name))
@@ -333,7 +333,7 @@ static VALUE rb_node_set_string_content(VALUE self, VALUE s) {
333
333
  static VALUE rb_node_get_type(VALUE self) {
334
334
  int node_type = 0;
335
335
  cmark_node *node = NULL;
336
- VALUE symbol = NULL;
336
+ VALUE symbol = Qnil;
337
337
  const char *s = NULL;
338
338
 
339
339
  TypedData_Get_Struct(self, cmark_node, &rb_Markly_Node_Type, node);
Binary file
@@ -28,9 +28,12 @@ module Markly
28
28
 
29
29
  def header(node)
30
30
  block do
31
- out('</section>') if @section
32
- @section = true
33
- out("<section #{id_for(node)}>")
31
+ if @ids
32
+ out('</section>') if @section
33
+ @section = true
34
+ out("<section#{id_for(node)}>")
35
+ end
36
+
34
37
  out('<h', node.header_level, "#{source_position(node)}>", :children,
35
38
  '</h', node.header_level, '>')
36
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markly
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-07-31 00:00:00.000000000 Z
13
+ date: 2020-08-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bake
@@ -150,6 +150,7 @@ files:
150
150
  - ext/markly/xml.c
151
151
  - lib/markly.rb
152
152
  - lib/markly/flags.rb
153
+ - lib/markly/markly.so
153
154
  - lib/markly/node.rb
154
155
  - lib/markly/node/inspect.rb
155
156
  - lib/markly/renderer.rb