raindown 0.17.1 → 0.18.0

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.
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Raindown
4
+ # What a node's rewrite writes below its directive: its Markdown, and a comment straight below the directive, like
5
+ # table:'s "2 rows · 3f2a9c", which its rewrite gets back as comment: the next time it writes. A rewrite can return a
6
+ # string instead, when it has no comment.
7
+ class Written
8
+ attr_reader :markdown, :comment
9
+
10
+ def initialize(markdown, comment: nil)
11
+ @markdown = markdown
12
+ @comment = comment
13
+ end
14
+
15
+ # Its Markdown, as a rewrite's string would be, like when it's rendered as HTML.
16
+ def to_s
17
+ markdown.to_s
18
+ end
19
+ end
20
+ end
data/lib/raindown.rb CHANGED
@@ -16,6 +16,7 @@ require_relative 'raindown/heading_ids'
16
16
  require_relative 'raindown/node_blocks'
17
17
  require_relative 'raindown/pages'
18
18
  require_relative 'raindown/pre_renderer'
19
+ require_relative 'raindown/table/table_formatter'
19
20
  require_relative 'raindown/utils'
20
21
  require_relative 'raindown/variables'
21
22
  require_relative 'raindown/wiki_links'
@@ -89,7 +90,7 @@ module Raindown
89
90
 
90
91
  # Markdown to HTML, like a document's or a component's slot.
91
92
  def commonmark(markdown)
92
- doc = Commonmarker.parse(hide_directives(markdown:), options: MARKDOWN_OPTIONS)
93
+ doc = Commonmarker.parse(hide_directives(markdown: TableFormatter.gfm(markdown)), options: MARKDOWN_OPTIONS)
93
94
  preserve_code(doc:)
94
95
 
95
96
  html = highlight_code? ? doc.to_html(options: HTML_OPTIONS) : unhighlighted_html(doc:)
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Raindown
4
- VERSION = '0.17.1'
4
+ VERSION = '0.18.0'
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raindown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-11-08 00:00:00.000000000 Z
10
+ date: 2026-11-09 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: antlers
@@ -248,13 +248,18 @@ files:
248
248
  - lib/raindown/page.rb
249
249
  - lib/raindown/pages.rb
250
250
  - lib/raindown/pre_renderer.rb
251
+ - lib/raindown/problem.rb
251
252
  - lib/raindown/projects.rb
252
253
  - lib/raindown/rewriter.rb
253
254
  - lib/raindown/server.rb
254
255
  - lib/raindown/skeleton.rb
255
256
  - lib/raindown/stat.rb
257
+ - lib/raindown/table/file_cell.rb
256
258
  - lib/raindown/table/markdown_table.rb
259
+ - lib/raindown/table/matched_rows.rb
257
260
  - lib/raindown/table/table.rb
261
+ - lib/raindown/table/table_column.rb
262
+ - lib/raindown/table/table_file.rb
258
263
  - lib/raindown/table/table_formatter.rb
259
264
  - lib/raindown/table/table_formulas.rb
260
265
  - lib/raindown/table/written_table.rb
@@ -337,6 +342,7 @@ files:
337
342
  - lib/raindown/wiki_links.rb
338
343
  - lib/raindown/workers/worker.rb
339
344
  - lib/raindown/workers/workers.rb
345
+ - lib/raindown/written.rb
340
346
  - lib/version.rb
341
347
  homepage: https://github.com/rainpour/raindown
342
348
  licenses: []