kramdown-merge 7.0.0 → 7.1.1
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 +4 -4
- checksums.yaml.gz.sig +3 -2
- data/LICENSE.md +13 -0
- data/README.md +295 -0
- data/lib/kramdown/merge/backend.rb +103 -0
- data/lib/kramdown/merge/version.rb +5 -3
- data/lib/kramdown/merge.rb +59 -30
- data/lib/kramdown-merge.rb +7 -1
- data/sig/kramdown/merge.rbs +8 -0
- data.tar.gz.sig +0 -0
- metadata +252 -15
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc68407246ceb473e50e7ef966b303f10c123bd9d5a9d6de813175f613bc1ffe
|
|
4
|
+
data.tar.gz: 637bd08bab590172014dc68c9babec5df64eb9a0562057a20f3be693eadb51d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70d9093608413409dc87ad7f9d34e3aadde467ad98f3a8082e3dbeded3f9106eef6137f27f33d48084647cabcd4feaced71410d0e2e33a1f1474f295c119aebc
|
|
7
|
+
data.tar.gz: 7c54964af28bc4d8b44c786197531c14fb1a2ad0e4d5d308a5a59a9d1737013fffbd98b03399fb65116e536f90173162f40d0674f59e4f71e32eb447ed25f043
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
���O�7��xVYll��.��ٛ�
|
|
2
|
+
���p��R31�m�1z��<�e5ņ�Cq�=�@H,J�dISz{�͂$����n���#J���T3"K�F�_$�].ؘ��!�d����+�T�d�m���o���э��6�O'&/�'���&R
|
|
3
|
+
U@|K�¸+��^9�.�Bo�N�|��njW��;^�X47a�j
|
data/LICENSE.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
This project is made available under the following licenses.
|
|
4
|
+
Choose the option that best fits your use case:
|
|
5
|
+
|
|
6
|
+
- [AGPL-3.0-only](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/AGPL-3.0-only.md)
|
|
7
|
+
- [PolyForm-Small-Business-1.0.0](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/PolyForm-Small-Business-1.0.0.md)
|
|
8
|
+
|
|
9
|
+
If none of the above licenses fit your use case, please [contact us](mailto:floss@galtzo.com) to discuss a custom commercial license.
|
|
10
|
+
|
|
11
|
+
## Copyright Notice
|
|
12
|
+
|
|
13
|
+
- Required Notice: Copyright (c) 2026 Peter H. Boling
|
data/README.md
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
<a href="https://github.com/structuredmerge"><img alt="structuredmerge Logo by GitHub" src="https://github.com/structuredmerge.png?size=192" width="14%" align="right"/></a>
|
|
2
|
+
|
|
3
|
+
# ☯️ Kramdown::Merge
|
|
4
|
+
|
|
5
|
+
[![Version][👽versioni]][👽version] [![Ruby Users Forum][✉️ruby-forum-top-img]][✉️ruby-forum] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: AGPL-3.0-only OR PolyForm-Small-Business-1.0.0][📄license-img]][📄license] [![Total downloads][👽dl-ranki]][👽dl-rank] [![CI Current][🚎11-c-wfi]][🚎11-c-wf]
|
|
6
|
+
|
|
7
|
+
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know on Discord][✉️discord-invite] or [RubyForum][✉️ruby-forum], as I may have missed the notification.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
`if ci_badges.map(&:color).all? { it == "green"}` 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.
|
|
12
|
+
|
|
13
|
+
[![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate at ko-fi.com][🖇kofi-img]][🖇kofi]
|
|
14
|
+
|
|
15
|
+
<details markdown="1">
|
|
16
|
+
<summary>👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️</summary>
|
|
17
|
+
|
|
18
|
+
I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-takeover-of-rubygems-my-thoughts-5hlo).
|
|
19
|
+
|
|
20
|
+
</details>
|
|
21
|
+
|
|
22
|
+
## 🌻 Synopsis <a href="https://discord.gg/3qme4XHNKN"><img alt="Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px.svg" width="8%" align="right"/></a> <a href="https://ruby-toolbox.com"><img alt="ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5" src="https://logos.galtzo.com/assets/images/ruby-lang/avatar-128px.svg" width="8%" align="right"/></a>
|
|
23
|
+
|
|
24
|
+
`Kramdown::Merge` is a Ruby provider package for the Markdown merge family. Markdown provider backed by Kramdown. It registers its backend with `tree_haver` and exposes provider-specific defaults while preserving the canonical family contract.
|
|
25
|
+
|
|
26
|
+
### Key Features
|
|
27
|
+
|
|
28
|
+
- Backend registration for `Kramdown`.
|
|
29
|
+
- Provider-specific parser capability reporting.
|
|
30
|
+
- Family-compatible parse and merge methods.
|
|
31
|
+
- Structured diagnostics for unsupported backends and parser failures.
|
|
32
|
+
- A provider `SmartMerger` wrapper when the underlying family exposes one.
|
|
33
|
+
|
|
34
|
+
## 💡 Info you can shake a stick at
|
|
35
|
+
|
|
36
|
+
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
37
|
+
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
38
|
+
| Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf]|
|
|
39
|
+
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Get help from RubyForum][✉️ruby-forum-img]][✉️ruby-forum] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
|
40
|
+
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on GitHub.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
|
|
41
|
+
| Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![Maintainer Blog][🚂maint-blog-img]][🚂maint-blog] [![GitLab Wiki][📜gl-wiki-img]][📜gl-wiki] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
|
|
42
|
+
| Compliance | [![License: AGPL-3.0-only OR PolyForm-Small-Business-1.0.0][📄license-img]][📄license] [![Apache license compatibility: Category X][📄license-compat-img]][📄license-compat] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] |
|
|
43
|
+
| Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![Compatibility appraised by: appraisal2][💎appraisal2-img]][💎appraisal2] |
|
|
44
|
+
| Maintainer 🎖️ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖🦋bluesky-img]][💖🦋bluesky] [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact] [![My technical writing][💖💁🏼♂️devto-img]][💖💁🏼♂️devto] |
|
|
45
|
+
| `...` 💖 | [![Find Me on WellFound:][💖✌️wellfound-img]][💖✌️wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][💖🌳linktree-img]][💖🌳linktree] [![More About Me][💖💁🏼♂️aboutme-img]][💖💁🏼♂️aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [🧪][💖🧪lab] |
|
|
46
|
+
|
|
47
|
+
### Compatibility
|
|
48
|
+
|
|
49
|
+
Compatible with MRI Ruby 4.0.0+, and concordant releases of JRuby, and TruffleRuby.
|
|
50
|
+
CI workflows and Appraisals are generated for MRI Ruby 4.0.0+.
|
|
51
|
+
This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
|
|
52
|
+
may be higher than the gem's runtime compatibility floor when legacy Rubies are
|
|
53
|
+
not practical for the current toolchain.
|
|
54
|
+
|
|
55
|
+
<a href="https://github.com/kettle-dev"><img alt="kettle-dev Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-dev/avatar-128px.svg" width="14%" align="right"/></a>
|
|
56
|
+
|
|
57
|
+
The _amazing_ test matrix is powered by the kettle-dev stack.
|
|
58
|
+
|
|
59
|
+
<details markdown="1">
|
|
60
|
+
<summary>How kettle-dev manages complexity in tests</summary>
|
|
61
|
+
|
|
62
|
+
| Gem | Source | Role | Total downloads |
|
|
63
|
+
|-----|--------|------|---------------------|
|
|
64
|
+
| [appraisal2](https://clickgems.clickhouse.com/dashboard/appraisal2) | [GitHub](https://github.com/appraisal-rb/appraisal2) | multi-dependency Appraisal matrix generation | [](https://clickgems.clickhouse.com/dashboard/appraisal2) |
|
|
65
|
+
| [appraisal2-rubocop](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) | [GitHub](https://github.com/appraisal-rb/appraisal2-rubocop) | RuboCop Appraisal generator integration | [](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) |
|
|
66
|
+
| [kettle-dev](https://clickgems.clickhouse.com/dashboard/kettle-dev) | [GitHub](https://github.com/kettle-dev/kettle-dev) | development, release, and CI workflow tooling | [](https://clickgems.clickhouse.com/dashboard/kettle-dev) |
|
|
67
|
+
| [kettle-jem](https://clickgems.clickhouse.com/dashboard/kettle-jem) | [GitHub](https://github.com/kettle-dev/kettle-jem) | Appraisals & CI workflow templates | [](https://clickgems.clickhouse.com/dashboard/kettle-jem) |
|
|
68
|
+
| [kettle-soup-cover](https://clickgems.clickhouse.com/dashboard/kettle-soup-cover) | [GitHub](https://github.com/kettle-dev/kettle-soup-cover) | SimpleCov coverage policy and reporting | [](https://clickgems.clickhouse.com/dashboard/kettle-soup-cover) |
|
|
69
|
+
| [kettle-test](https://clickgems.clickhouse.com/dashboard/kettle-test) | [GitHub](https://github.com/kettle-dev/kettle-test) | standard test runner and coverage harness | [](https://clickgems.clickhouse.com/dashboard/kettle-test) |
|
|
70
|
+
| [rubocop-lts](https://clickgems.clickhouse.com/dashboard/rubocop-lts) | [GitHub](https://github.com/rubocop-lts/rubocop-lts) | Ruby-version-aware linting | [](https://clickgems.clickhouse.com/dashboard/rubocop-lts) |
|
|
71
|
+
| [turbo_tests2](https://clickgems.clickhouse.com/dashboard/turbo_tests2) | [GitHub](https://github.com/galtzo-floss/turbo_tests2) | parallel test execution | [](https://clickgems.clickhouse.com/dashboard/turbo_tests2) |
|
|
72
|
+
|
|
73
|
+
</details>
|
|
74
|
+
|
|
75
|
+
## ✨ Installation
|
|
76
|
+
|
|
77
|
+
Install the gem and add to the application's Gemfile by executing:
|
|
78
|
+
|
|
79
|
+
```console
|
|
80
|
+
bundle add kramdown-merge
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
84
|
+
|
|
85
|
+
```console
|
|
86
|
+
gem install kramdown-merge
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## ⚙️ Configuration
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
require "kramdown/merge"
|
|
93
|
+
|
|
94
|
+
profile = Kramdown::Merge.markdown_backend_feature_profile(backend: :kramdown)
|
|
95
|
+
context = Kramdown::Merge.markdown_plan_context(backend: :kramdown)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Use this package when you want a hard dependency on the `Kramdown` backend. Use the canonical family package when backend auto-selection is preferred.
|
|
99
|
+
|
|
100
|
+
## 🔧 Basic Usage
|
|
101
|
+
|
|
102
|
+
```ruby
|
|
103
|
+
require "kramdown/merge"
|
|
104
|
+
|
|
105
|
+
result = Kramdown::Merge.merge_markdown(
|
|
106
|
+
File.read("template.md"),
|
|
107
|
+
File.read("destination.md"),
|
|
108
|
+
"markdown",
|
|
109
|
+
backend: :kramdown,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
abort result.fetch(:diagnostics).inspect unless result.fetch(:ok)
|
|
113
|
+
File.write("destination.md", result.fetch(:output))
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## 🔐 Security
|
|
117
|
+
|
|
118
|
+
See [SECURITY.md][🔐security].
|
|
119
|
+
|
|
120
|
+
## 🤝 Contributing
|
|
121
|
+
|
|
122
|
+
If you need some ideas of where to help, you could work on adding more code coverage,
|
|
123
|
+
or if it is already 💯 (see [below](#code-coverage)) check [issues][🤝gh-issues] or [PRs][🤝gh-pulls],
|
|
124
|
+
or use the gem and think about how it could be better.
|
|
125
|
+
|
|
126
|
+
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
|
|
127
|
+
|
|
128
|
+
See [CONTRIBUTING.md][🤝contributing] for more detailed instructions.
|
|
129
|
+
|
|
130
|
+
### Code Coverage
|
|
131
|
+
|
|
132
|
+
<details markdown="1">
|
|
133
|
+
<summary>Coverage service badges</summary>
|
|
134
|
+
|
|
135
|
+
</details>
|
|
136
|
+
|
|
137
|
+
## 📌 Versioning
|
|
138
|
+
|
|
139
|
+
This library follows [![Semantic Versioning 2.0.0][📌semver-img]][📌semver] for its public API where practical.
|
|
140
|
+
For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
|
141
|
+
|
|
142
|
+
For example:
|
|
143
|
+
|
|
144
|
+
```ruby
|
|
145
|
+
spec.add_dependency("kramdown-merge", "~> 7.0")
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
<details markdown="1">
|
|
149
|
+
<summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
|
|
150
|
+
|
|
151
|
+
Dropping support for a platform can be a breaking change for affected users.
|
|
152
|
+
If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
|
|
153
|
+
|
|
154
|
+
To get a better understanding of how SemVer is intended to work over a project's lifetime,
|
|
155
|
+
read this article from the creator of SemVer:
|
|
156
|
+
|
|
157
|
+
- ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
|
|
158
|
+
|
|
159
|
+
</details>
|
|
160
|
+
|
|
161
|
+
See [CHANGELOG.md][📌changelog] for a list of releases.
|
|
162
|
+
|
|
163
|
+
## 📄 License
|
|
164
|
+
|
|
165
|
+
The gem is available under the following licenses: [AGPL-3.0-only](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/AGPL-3.0-only.md), [PolyForm-Small-Business-1.0.0](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/PolyForm-Small-Business-1.0.0.md).
|
|
166
|
+
See [LICENSE.md][📄license] for details.
|
|
167
|
+
|
|
168
|
+
If none of the available licenses suit your use case, please [contact us](mailto:floss@galtzo.com) to discuss a custom commercial license.
|
|
169
|
+
|
|
170
|
+
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
|
|
171
|
+
[⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
|
|
172
|
+
[⛳liberapay]: https://liberapay.com/pboling/donate
|
|
173
|
+
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
|
|
174
|
+
[🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
|
|
175
|
+
[🖇sponsor]: https://github.com/sponsors/pboling
|
|
176
|
+
[🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
|
|
177
|
+
[🖇kofi]: https://ko-fi.com/pboling
|
|
178
|
+
[🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
|
|
179
|
+
[🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
|
|
180
|
+
[🖇buyme]: https://www.buymeacoffee.com/pboling
|
|
181
|
+
[🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
|
|
182
|
+
[🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
|
|
183
|
+
[🖇paypal]: https://www.paypal.com/paypalme/peterboling
|
|
184
|
+
[🖇floss-funding.dev]: https://floss-funding.dev
|
|
185
|
+
[🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
|
|
186
|
+
[✉️discord-invite]: https://discord.gg/3qme4XHNKN
|
|
187
|
+
[✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
|
|
188
|
+
[✉️ruby-friends-img]: https://img.shields.io/badge/daily.dev-%F0%9F%92%8E_Ruby_Friends-0A0A0A?style=for-the-badge&logo=dailydotdev&logoColor=white
|
|
189
|
+
[✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
|
|
190
|
+
[✉️ruby-forum-top-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=flat&logo=discourse&label=Ruby%20Users%20Forum
|
|
191
|
+
[✉️ruby-forum-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=for-the-badge&logo=discourse&label=Ruby%20Users%20Forum
|
|
192
|
+
[✉️ruby-forum]: https://www.rubyforum.org/tag/structuredmerge
|
|
193
|
+
[✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
|
|
194
|
+
[⛳️gem-namespace]: https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/kramdown-merge
|
|
195
|
+
[⛳️namespace-img]: https://img.shields.io/badge/namespace-Kramdown::Merge-3C2D2D.svg?style=square&logo=ruby&logoColor=white
|
|
196
|
+
[⛳️gem-name]: https://clickgems.clickhouse.com/dashboard/kramdown-merge
|
|
197
|
+
[⛳️name-img]: https://img.shields.io/badge/name-kramdown--merge-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
|
|
198
|
+
[⛳️tag-img]: https://img.shields.io/github/tag/structuredmerge/structuredmerge-ruby.svg
|
|
199
|
+
[⛳️tag]: https://github.com/structuredmerge/structuredmerge-ruby/releases
|
|
200
|
+
[🚂maint-blog]: http://www.railsbling.com/tags/kramdown-merge
|
|
201
|
+
[🚂maint-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
|
|
202
|
+
[🚂maint-contact]: http://www.railsbling.com/contact
|
|
203
|
+
[🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
|
|
204
|
+
[💖🖇linkedin]: http://www.linkedin.com/in/peterboling
|
|
205
|
+
[💖🖇linkedin-img]: https://img.shields.io/badge/LinkedIn-Profile-0B66C2?style=flat&logo=newjapanprowrestling
|
|
206
|
+
[💖✌️wellfound]: https://wellfound.com/u/peter-boling
|
|
207
|
+
[💖✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound
|
|
208
|
+
[💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling
|
|
209
|
+
[💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase
|
|
210
|
+
[💖🐘ruby-mast]: https://ruby.social/@galtzo
|
|
211
|
+
[💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https://ruby.social&style=flat&logo=mastodon&label=Ruby%20@galtzo
|
|
212
|
+
[💖🦋bluesky]: https://bsky.app/profile/galtzo.com
|
|
213
|
+
[💖🦋bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white
|
|
214
|
+
[💖🌳linktree]: https://linktr.ee/galtzo
|
|
215
|
+
[💖🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree
|
|
216
|
+
[💖💁🏼♂️devto]: https://dev.to/galtzo
|
|
217
|
+
[💖💁🏼♂️devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white
|
|
218
|
+
[💖💁🏼♂️aboutme]: https://about.me/peter.boling
|
|
219
|
+
[💖💁🏼♂️aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white
|
|
220
|
+
[💖🧊berg]: https://codeberg.org/pboling
|
|
221
|
+
[💖🐙hub]: https://github.org/pboling
|
|
222
|
+
[💖🛖hut]: https://sr.ht/~galtzo/
|
|
223
|
+
[💖🧪lab]: https://gitlab.com/pboling
|
|
224
|
+
[👨🏼🏫expsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share
|
|
225
|
+
[👨🏼🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
|
|
226
|
+
[👨🏼🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
|
|
227
|
+
[👨🏼🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
|
|
228
|
+
[🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-kramdown-merge?utm_source=rubygems-kramdown-merge&utm_medium=referral&utm_campaign=readme
|
|
229
|
+
[🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
|
|
230
|
+
[🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
|
|
231
|
+
[💁🏼♂️peterboling]: http://www.peterboling.com
|
|
232
|
+
[🚂railsbling]: http://www.railsbling.com
|
|
233
|
+
[📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
|
|
234
|
+
[📜src-gl]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/tree/main/gems/kramdown-merge
|
|
235
|
+
[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
|
|
236
|
+
[📜src-cb]: https://codeberg.org/structuredmerge/structuredmerge-ruby/src/branch/main/gems/kramdown-merge
|
|
237
|
+
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=GitHub&logoColor=green
|
|
238
|
+
[📜src-gh]: https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/kramdown-merge
|
|
239
|
+
[📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
240
|
+
[📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
241
|
+
[📜gl-wiki]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/wikis/home
|
|
242
|
+
[📜gh-wiki]: https://github.com/structuredmerge/structuredmerge-ruby/wiki
|
|
243
|
+
[📜gl-wiki-img]: https://img.shields.io/badge/wiki-gitlab-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
|
|
244
|
+
[📜gh-wiki-img]: https://img.shields.io/badge/wiki-github-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
|
|
245
|
+
[👽dl-rank]: https://clickgems.clickhouse.com/dashboard/kramdown-merge
|
|
246
|
+
[👽dl-ranki]: https://img.shields.io/gem/dt/kramdown-merge.svg
|
|
247
|
+
[👽version]: https://clickgems.clickhouse.com/dashboard/kramdown-merge
|
|
248
|
+
[👽versioni]: https://img.shields.io/gem/v/kramdown-merge.svg
|
|
249
|
+
[🚎11-c-wf]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml
|
|
250
|
+
[🚎11-c-wfi]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml/badge.svg
|
|
251
|
+
[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
|
|
252
|
+
[🤝gh-issues]: https://github.com/structuredmerge/structuredmerge-ruby/issues
|
|
253
|
+
[🤝gh-pulls]: https://github.com/structuredmerge/structuredmerge-ruby/pulls
|
|
254
|
+
[🤝gl-issues]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/issues
|
|
255
|
+
[🤝gl-pulls]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/merge_requests
|
|
256
|
+
[🤝cb-issues]: https://codeberg.org/structuredmerge/structuredmerge-ruby/issues
|
|
257
|
+
[🤝cb-pulls]: https://codeberg.org/structuredmerge/structuredmerge-ruby/pulls
|
|
258
|
+
[🤝cb-donate]: https://donate.codeberg.org/
|
|
259
|
+
[🤝contributing]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CONTRIBUTING.md
|
|
260
|
+
[🖐contrib-rocks]: https://contrib.rocks
|
|
261
|
+
[🖐contributors]: https://github.com/structuredmerge/structuredmerge-ruby/graphs/contributors
|
|
262
|
+
[🖐contributors-img]: https://contrib.rocks/image?repo=structuredmerge/structuredmerge-ruby
|
|
263
|
+
[🪇conduct]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CODE_OF_CONDUCT.md
|
|
264
|
+
[🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg
|
|
265
|
+
[📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
|
266
|
+
[📌semver]: https://semver.org/spec/v2.0.0.html
|
|
267
|
+
[📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat
|
|
268
|
+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
|
269
|
+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
|
270
|
+
[📌changelog]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CHANGELOG.md
|
|
271
|
+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
|
272
|
+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
|
|
273
|
+
[📌gitmoji]: https://gitmoji.dev
|
|
274
|
+
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
275
|
+
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
276
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.124-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
277
|
+
[🔐security]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/SECURITY.md
|
|
278
|
+
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
279
|
+
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
280
|
+
[📄license]: LICENSE.md
|
|
281
|
+
[📄license-ref]: LICENSE.md
|
|
282
|
+
[📄license-img]: https://img.shields.io/badge/License-AGPL--3.0--only_OR_PolyForm--Small--Business--1.0.0-259D6C.svg
|
|
283
|
+
[📄license-compat]: https://www.apache.org/legal/resolved.html#category-x
|
|
284
|
+
[📄license-compat-img]: https://img.shields.io/badge/Apache_Incompatible:_Category_X-%E2%9C%97-C0392B.svg?style=flat&logo=Apache
|
|
285
|
+
[📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
|
|
286
|
+
[📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
|
|
287
|
+
[🚎yard-current]: http://rubydoc.info/gems/kramdown-merge
|
|
288
|
+
[🚎yard-head]: https://kramdown-merge.galtzo.com
|
|
289
|
+
[💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
|
|
290
|
+
[💎SHA_checksums]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/tree/main/checksums
|
|
291
|
+
[💎rlts]: https://github.com/rubocop-lts/rubocop-lts
|
|
292
|
+
[💎rlts-img]: https://img.shields.io/badge/code_style_&_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white
|
|
293
|
+
[💎appraisal2]: https://github.com/appraisal-rb/appraisal2
|
|
294
|
+
[💎appraisal2-img]: https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white
|
|
295
|
+
[💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Kramdown
|
|
4
|
+
module Merge
|
|
5
|
+
module Backend
|
|
6
|
+
Markdown::Merge::BackendSupport.install!(
|
|
7
|
+
backend_module: self,
|
|
8
|
+
backend_name: :kramdown,
|
|
9
|
+
gem_name: 'kramdown',
|
|
10
|
+
require_path: 'kramdown/merge'
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
class Language < ::TreeHaver::Base::Language
|
|
14
|
+
def initialize(name = :markdown, options: {})
|
|
15
|
+
super(name, backend: :kramdown, options: options)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class << self
|
|
19
|
+
def markdown(options: {})
|
|
20
|
+
new(:markdown, options: options)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
Markdown::Merge::BackendSupport.configure_markdown_only_language_class!(
|
|
25
|
+
self,
|
|
26
|
+
backend_label: 'Kramdown'
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
class Parser < ::TreeHaver::Base::Parser
|
|
31
|
+
def parse(source)
|
|
32
|
+
raise 'Language not set' unless language
|
|
33
|
+
|
|
34
|
+
Backend.available? or raise 'Kramdown not available'
|
|
35
|
+
|
|
36
|
+
document = ::Kramdown::Document.new(source, **(language.options || {}))
|
|
37
|
+
Tree.new(document.root, source)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class Node < ::TreeHaver::Base::Node
|
|
42
|
+
TYPE_MAP = {
|
|
43
|
+
root: 'document',
|
|
44
|
+
header: 'heading',
|
|
45
|
+
codeblock: 'code_block',
|
|
46
|
+
p: 'paragraph'
|
|
47
|
+
}.freeze
|
|
48
|
+
|
|
49
|
+
Markdown::Merge::BackendSupport.configure_node_link_and_navigation!(
|
|
50
|
+
self,
|
|
51
|
+
next_sibling_selector: :next,
|
|
52
|
+
prev_sibling_selector: :previous,
|
|
53
|
+
parent_selector: :parent
|
|
54
|
+
)
|
|
55
|
+
Markdown::Merge::BackendSupport.configure_node_heading_and_code_block_helpers!(
|
|
56
|
+
self,
|
|
57
|
+
heading_matcher: ->(node) { node.raw_type == 'header' },
|
|
58
|
+
code_block_matcher: ->(node) { node.raw_type == 'codeblock' },
|
|
59
|
+
heading_level_extractor: ->(inner_node) { inner_node.options[:level] },
|
|
60
|
+
code_block_info_extractor: ->(inner_node) { inner_node.options[:lang] }
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def type
|
|
64
|
+
TYPE_MAP.fetch(raw_type.to_sym, raw_type)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
alias kind type
|
|
68
|
+
|
|
69
|
+
def raw_type
|
|
70
|
+
inner_node.type.to_s
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def text
|
|
74
|
+
return inner_node.value.to_s if inner_node.value
|
|
75
|
+
return inner_node.options[:raw_text].to_s if inner_node.options.key?(:raw_text)
|
|
76
|
+
|
|
77
|
+
children.map(&:text).join
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def children
|
|
81
|
+
Array(inner_node.children).map { |child| self.class.new(child, source: source, lines: lines) }
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def start_point
|
|
85
|
+
line = [inner_node.options.fetch(:location, 1).to_i - 1, 0].max
|
|
86
|
+
Point.new(line, 0)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def end_point
|
|
90
|
+
Point.new([start_point.row + text.lines.count - 1, start_point.row].max, 0)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def start_byte
|
|
94
|
+
calculate_byte_offset(start_point.row, start_point.column)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def end_byte
|
|
98
|
+
calculate_byte_offset(end_point.row, end_point.column)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Kramdown
|
|
4
4
|
module Merge
|
|
5
|
+
# Version namespace for this gem.
|
|
5
6
|
module Version
|
|
6
|
-
|
|
7
|
+
# Current gem version.
|
|
8
|
+
VERSION = '7.1.1'
|
|
7
9
|
end
|
|
8
|
-
|
|
9
|
-
VERSION = Version::VERSION
|
|
10
|
+
# Current gem version exposed at the traditional constant location.
|
|
11
|
+
VERSION = Version::VERSION # Traditional Constant Location
|
|
10
12
|
end
|
|
11
13
|
end
|
data/lib/kramdown/merge.rb
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require 'markdown-merge'
|
|
4
|
+
require 'kramdown'
|
|
5
|
+
require_relative 'merge/version'
|
|
5
6
|
|
|
6
7
|
module Kramdown
|
|
7
8
|
module Merge
|
|
8
|
-
|
|
9
|
+
module_function
|
|
9
10
|
|
|
10
|
-
PACKAGE_NAME =
|
|
11
|
-
BACKEND_REFERENCE = TreeHaver::BackendReference.new(id:
|
|
11
|
+
PACKAGE_NAME = 'kramdown-merge'
|
|
12
|
+
BACKEND_REFERENCE = TreeHaver::BackendReference.new(id: 'kramdown', family: 'native').freeze
|
|
12
13
|
TreeHaver::BackendRegistry.register(BACKEND_REFERENCE)
|
|
13
14
|
|
|
14
15
|
def markdown_feature_profile
|
|
@@ -21,7 +22,9 @@ module Kramdown
|
|
|
21
22
|
|
|
22
23
|
def markdown_backend_feature_profile(backend: nil)
|
|
23
24
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
24
|
-
|
|
25
|
+
unless requested == BACKEND_REFERENCE.id
|
|
26
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
27
|
+
end
|
|
25
28
|
|
|
26
29
|
markdown_feature_profile.merge(backend: BACKEND_REFERENCE.id, backend_ref: BACKEND_REFERENCE.to_h)
|
|
27
30
|
end
|
|
@@ -42,20 +45,22 @@ module Kramdown
|
|
|
42
45
|
|
|
43
46
|
def parse_markdown(source, dialect, backend: nil)
|
|
44
47
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
45
|
-
|
|
48
|
+
unless requested == BACKEND_REFERENCE.id
|
|
49
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
50
|
+
end
|
|
46
51
|
|
|
47
|
-
return unsupported_feature_result("Unsupported Markdown dialect #{dialect}.") unless dialect ==
|
|
52
|
+
return unsupported_feature_result("Unsupported Markdown dialect #{dialect}.") unless dialect == 'markdown'
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
TreeHaver.with_backend(BACKEND_REFERENCE.id) { TreeHaver.parser_for(:markdown).parse(source) }
|
|
50
55
|
normalized = Markdown::Merge.normalize_source(source)
|
|
51
56
|
{
|
|
52
57
|
ok: true,
|
|
53
58
|
diagnostics: [],
|
|
54
59
|
analysis: {
|
|
55
|
-
kind:
|
|
60
|
+
kind: 'markdown',
|
|
56
61
|
dialect: dialect,
|
|
57
62
|
normalized_source: normalized,
|
|
58
|
-
root_kind:
|
|
63
|
+
root_kind: 'document',
|
|
59
64
|
owners: Markdown::Merge.collect_markdown_owners(normalized)
|
|
60
65
|
},
|
|
61
66
|
policies: []
|
|
@@ -63,7 +68,7 @@ module Kramdown
|
|
|
63
68
|
rescue StandardError => e
|
|
64
69
|
{
|
|
65
70
|
ok: false,
|
|
66
|
-
diagnostics: [{ severity:
|
|
71
|
+
diagnostics: [{ severity: 'error', category: 'parse_error', message: e.message }],
|
|
67
72
|
policies: []
|
|
68
73
|
}
|
|
69
74
|
end
|
|
@@ -74,69 +79,91 @@ module Kramdown
|
|
|
74
79
|
|
|
75
80
|
def merge_markdown(template_source, destination_source, dialect, backend: nil)
|
|
76
81
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
77
|
-
|
|
82
|
+
unless requested == BACKEND_REFERENCE.id
|
|
83
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
84
|
+
end
|
|
78
85
|
|
|
79
|
-
Markdown::Merge.merge_markdown(template_source, destination_source, dialect)
|
|
86
|
+
Markdown::Merge.merge_markdown(template_source, destination_source, dialect, backend: BACKEND_REFERENCE.id)
|
|
80
87
|
end
|
|
81
88
|
|
|
82
|
-
def merge_markdown_with_reviewed_nested_outputs(template_source, destination_source, dialect, review_state,
|
|
89
|
+
def merge_markdown_with_reviewed_nested_outputs(template_source, destination_source, dialect, review_state,
|
|
90
|
+
applied_children, backend: nil)
|
|
83
91
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
84
|
-
|
|
92
|
+
unless requested == BACKEND_REFERENCE.id
|
|
93
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
94
|
+
end
|
|
85
95
|
|
|
86
96
|
Markdown::Merge.merge_markdown_with_reviewed_nested_outputs(
|
|
87
97
|
template_source,
|
|
88
98
|
destination_source,
|
|
89
99
|
dialect,
|
|
90
100
|
review_state,
|
|
91
|
-
applied_children
|
|
101
|
+
applied_children,
|
|
102
|
+
backend: BACKEND_REFERENCE.id
|
|
92
103
|
)
|
|
93
104
|
end
|
|
94
105
|
|
|
95
|
-
def merge_markdown_with_reviewed_nested_outputs_from_replay_bundle(template_source, destination_source, dialect,
|
|
106
|
+
def merge_markdown_with_reviewed_nested_outputs_from_replay_bundle(template_source, destination_source, dialect,
|
|
107
|
+
replay_bundle, backend: nil)
|
|
96
108
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
97
|
-
|
|
109
|
+
unless requested == BACKEND_REFERENCE.id
|
|
110
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
111
|
+
end
|
|
98
112
|
|
|
99
113
|
Markdown::Merge.merge_markdown_with_reviewed_nested_outputs_from_replay_bundle(
|
|
100
114
|
template_source,
|
|
101
115
|
destination_source,
|
|
102
116
|
dialect,
|
|
103
|
-
replay_bundle
|
|
117
|
+
replay_bundle,
|
|
118
|
+
backend: BACKEND_REFERENCE.id
|
|
104
119
|
)
|
|
105
120
|
end
|
|
106
121
|
|
|
107
|
-
def merge_markdown_with_reviewed_nested_outputs_from_replay_bundle_envelope(template_source, destination_source,
|
|
122
|
+
def merge_markdown_with_reviewed_nested_outputs_from_replay_bundle_envelope(template_source, destination_source,
|
|
123
|
+
dialect, envelope, backend: nil)
|
|
108
124
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
109
|
-
|
|
125
|
+
unless requested == BACKEND_REFERENCE.id
|
|
126
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
127
|
+
end
|
|
110
128
|
|
|
111
129
|
Markdown::Merge.merge_markdown_with_reviewed_nested_outputs_from_replay_bundle_envelope(
|
|
112
130
|
template_source,
|
|
113
131
|
destination_source,
|
|
114
132
|
dialect,
|
|
115
|
-
envelope
|
|
133
|
+
envelope,
|
|
134
|
+
backend: BACKEND_REFERENCE.id
|
|
116
135
|
)
|
|
117
136
|
end
|
|
118
137
|
|
|
119
|
-
def merge_markdown_with_reviewed_nested_outputs_from_review_state(template_source, destination_source, dialect,
|
|
138
|
+
def merge_markdown_with_reviewed_nested_outputs_from_review_state(template_source, destination_source, dialect,
|
|
139
|
+
review_state, backend: nil)
|
|
120
140
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
121
|
-
|
|
141
|
+
unless requested == BACKEND_REFERENCE.id
|
|
142
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
143
|
+
end
|
|
122
144
|
|
|
123
145
|
Markdown::Merge.merge_markdown_with_reviewed_nested_outputs_from_review_state(
|
|
124
146
|
template_source,
|
|
125
147
|
destination_source,
|
|
126
148
|
dialect,
|
|
127
|
-
review_state
|
|
149
|
+
review_state,
|
|
150
|
+
backend: BACKEND_REFERENCE.id
|
|
128
151
|
)
|
|
129
152
|
end
|
|
130
153
|
|
|
131
|
-
def merge_markdown_with_reviewed_nested_outputs_from_review_state_envelope(template_source, destination_source,
|
|
154
|
+
def merge_markdown_with_reviewed_nested_outputs_from_review_state_envelope(template_source, destination_source,
|
|
155
|
+
dialect, envelope, backend: nil)
|
|
132
156
|
requested = backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
133
|
-
|
|
157
|
+
unless requested == BACKEND_REFERENCE.id
|
|
158
|
+
return unsupported_feature_result("Unsupported Markdown backend #{requested}.")
|
|
159
|
+
end
|
|
134
160
|
|
|
135
161
|
Markdown::Merge.merge_markdown_with_reviewed_nested_outputs_from_review_state_envelope(
|
|
136
162
|
template_source,
|
|
137
163
|
destination_source,
|
|
138
164
|
dialect,
|
|
139
|
-
envelope
|
|
165
|
+
envelope,
|
|
166
|
+
backend: BACKEND_REFERENCE.id
|
|
140
167
|
)
|
|
141
168
|
end
|
|
142
169
|
|
|
@@ -147,7 +174,7 @@ module Kramdown
|
|
|
147
174
|
def unsupported_feature_result(message)
|
|
148
175
|
{
|
|
149
176
|
ok: false,
|
|
150
|
-
diagnostics: [{ severity:
|
|
177
|
+
diagnostics: [{ severity: 'error', category: 'unsupported_feature', message: message }],
|
|
151
178
|
policies: []
|
|
152
179
|
}
|
|
153
180
|
end
|
|
@@ -170,3 +197,5 @@ module Kramdown
|
|
|
170
197
|
)
|
|
171
198
|
end
|
|
172
199
|
end
|
|
200
|
+
|
|
201
|
+
require_relative 'merge/backend'
|
data/lib/kramdown-merge.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kramdown-merge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: exe
|
|
9
9
|
cert_chain:
|
|
10
10
|
- |
|
|
11
11
|
-----BEGIN CERTIFICATE-----
|
|
@@ -37,60 +37,297 @@ cert_chain:
|
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
38
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: kramdown
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '2.5'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '2.5'
|
|
40
54
|
- !ruby/object:Gem::Dependency
|
|
41
55
|
name: markdown-merge
|
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|
|
43
57
|
requirements:
|
|
44
58
|
- - '='
|
|
45
59
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: 7.
|
|
60
|
+
version: 7.1.1
|
|
47
61
|
type: :runtime
|
|
48
62
|
prerelease: false
|
|
49
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
64
|
requirements:
|
|
51
65
|
- - '='
|
|
52
66
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: 7.
|
|
67
|
+
version: 7.1.1
|
|
54
68
|
- !ruby/object:Gem::Dependency
|
|
55
|
-
name:
|
|
69
|
+
name: version_gem
|
|
56
70
|
requirement: !ruby/object:Gem::Requirement
|
|
57
71
|
requirements:
|
|
58
72
|
- - "~>"
|
|
59
73
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '
|
|
74
|
+
version: '1.1'
|
|
75
|
+
- - ">="
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: 1.1.15
|
|
61
78
|
type: :runtime
|
|
62
79
|
prerelease: false
|
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
81
|
+
requirements:
|
|
82
|
+
- - "~>"
|
|
83
|
+
- !ruby/object:Gem::Version
|
|
84
|
+
version: '1.1'
|
|
85
|
+
- - ">="
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: 1.1.15
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
name: kettle-dev
|
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - "~>"
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '2.5'
|
|
95
|
+
- - ">="
|
|
96
|
+
- !ruby/object:Gem::Version
|
|
97
|
+
version: 2.5.17
|
|
98
|
+
type: :development
|
|
99
|
+
prerelease: false
|
|
63
100
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
101
|
requirements:
|
|
65
102
|
- - "~>"
|
|
66
103
|
- !ruby/object:Gem::Version
|
|
67
104
|
version: '2.5'
|
|
68
|
-
|
|
69
|
-
|
|
105
|
+
- - ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: 2.5.17
|
|
108
|
+
- !ruby/object:Gem::Dependency
|
|
109
|
+
name: bundler-audit
|
|
110
|
+
requirement: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
- - "~>"
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
version: 0.9.3
|
|
115
|
+
type: :development
|
|
116
|
+
prerelease: false
|
|
117
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
118
|
+
requirements:
|
|
119
|
+
- - "~>"
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: 0.9.3
|
|
122
|
+
- !ruby/object:Gem::Dependency
|
|
123
|
+
name: rake
|
|
124
|
+
requirement: !ruby/object:Gem::Requirement
|
|
125
|
+
requirements:
|
|
126
|
+
- - "~>"
|
|
127
|
+
- !ruby/object:Gem::Version
|
|
128
|
+
version: '13.0'
|
|
129
|
+
type: :development
|
|
130
|
+
prerelease: false
|
|
131
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
132
|
+
requirements:
|
|
133
|
+
- - "~>"
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: '13.0'
|
|
136
|
+
- !ruby/object:Gem::Dependency
|
|
137
|
+
name: require_bench
|
|
138
|
+
requirement: !ruby/object:Gem::Requirement
|
|
139
|
+
requirements:
|
|
140
|
+
- - "~>"
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: '1.0'
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: 1.0.4
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - "~>"
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '1.0'
|
|
153
|
+
- - ">="
|
|
154
|
+
- !ruby/object:Gem::Version
|
|
155
|
+
version: 1.0.4
|
|
156
|
+
- !ruby/object:Gem::Dependency
|
|
157
|
+
name: anonymous_loader
|
|
158
|
+
requirement: !ruby/object:Gem::Requirement
|
|
159
|
+
requirements:
|
|
160
|
+
- - "~>"
|
|
161
|
+
- !ruby/object:Gem::Version
|
|
162
|
+
version: '0.1'
|
|
163
|
+
- - ">="
|
|
164
|
+
- !ruby/object:Gem::Version
|
|
165
|
+
version: 0.1.3
|
|
166
|
+
type: :development
|
|
167
|
+
prerelease: false
|
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
169
|
+
requirements:
|
|
170
|
+
- - "~>"
|
|
171
|
+
- !ruby/object:Gem::Version
|
|
172
|
+
version: '0.1'
|
|
173
|
+
- - ">="
|
|
174
|
+
- !ruby/object:Gem::Version
|
|
175
|
+
version: 0.1.3
|
|
176
|
+
- !ruby/object:Gem::Dependency
|
|
177
|
+
name: appraisal2
|
|
178
|
+
requirement: !ruby/object:Gem::Requirement
|
|
179
|
+
requirements:
|
|
180
|
+
- - "~>"
|
|
181
|
+
- !ruby/object:Gem::Version
|
|
182
|
+
version: '3.2'
|
|
183
|
+
- - ">="
|
|
184
|
+
- !ruby/object:Gem::Version
|
|
185
|
+
version: 3.2.0
|
|
186
|
+
type: :development
|
|
187
|
+
prerelease: false
|
|
188
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
189
|
+
requirements:
|
|
190
|
+
- - "~>"
|
|
191
|
+
- !ruby/object:Gem::Version
|
|
192
|
+
version: '3.2'
|
|
193
|
+
- - ">="
|
|
194
|
+
- !ruby/object:Gem::Version
|
|
195
|
+
version: 3.2.0
|
|
196
|
+
- !ruby/object:Gem::Dependency
|
|
197
|
+
name: kettle-test
|
|
198
|
+
requirement: !ruby/object:Gem::Requirement
|
|
199
|
+
requirements:
|
|
200
|
+
- - "~>"
|
|
201
|
+
- !ruby/object:Gem::Version
|
|
202
|
+
version: '2.0'
|
|
203
|
+
- - ">="
|
|
204
|
+
- !ruby/object:Gem::Version
|
|
205
|
+
version: 2.0.19
|
|
206
|
+
type: :development
|
|
207
|
+
prerelease: false
|
|
208
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
209
|
+
requirements:
|
|
210
|
+
- - "~>"
|
|
211
|
+
- !ruby/object:Gem::Version
|
|
212
|
+
version: '2.0'
|
|
213
|
+
- - ">="
|
|
214
|
+
- !ruby/object:Gem::Version
|
|
215
|
+
version: 2.0.19
|
|
216
|
+
- !ruby/object:Gem::Dependency
|
|
217
|
+
name: turbo_tests2
|
|
218
|
+
requirement: !ruby/object:Gem::Requirement
|
|
219
|
+
requirements:
|
|
220
|
+
- - "~>"
|
|
221
|
+
- !ruby/object:Gem::Version
|
|
222
|
+
version: '3.2'
|
|
223
|
+
- - ">="
|
|
224
|
+
- !ruby/object:Gem::Version
|
|
225
|
+
version: 3.2.4
|
|
226
|
+
type: :development
|
|
227
|
+
prerelease: false
|
|
228
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
229
|
+
requirements:
|
|
230
|
+
- - "~>"
|
|
231
|
+
- !ruby/object:Gem::Version
|
|
232
|
+
version: '3.2'
|
|
233
|
+
- - ">="
|
|
234
|
+
- !ruby/object:Gem::Version
|
|
235
|
+
version: 3.2.4
|
|
236
|
+
- !ruby/object:Gem::Dependency
|
|
237
|
+
name: ruby-progressbar
|
|
238
|
+
requirement: !ruby/object:Gem::Requirement
|
|
239
|
+
requirements:
|
|
240
|
+
- - "~>"
|
|
241
|
+
- !ruby/object:Gem::Version
|
|
242
|
+
version: '1.13'
|
|
243
|
+
type: :development
|
|
244
|
+
prerelease: false
|
|
245
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
246
|
+
requirements:
|
|
247
|
+
- - "~>"
|
|
248
|
+
- !ruby/object:Gem::Version
|
|
249
|
+
version: '1.13'
|
|
250
|
+
- !ruby/object:Gem::Dependency
|
|
251
|
+
name: stone_checksums
|
|
252
|
+
requirement: !ruby/object:Gem::Requirement
|
|
253
|
+
requirements:
|
|
254
|
+
- - "~>"
|
|
255
|
+
- !ruby/object:Gem::Version
|
|
256
|
+
version: '1.0'
|
|
257
|
+
- - ">="
|
|
258
|
+
- !ruby/object:Gem::Version
|
|
259
|
+
version: 1.0.8
|
|
260
|
+
type: :development
|
|
261
|
+
prerelease: false
|
|
262
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
263
|
+
requirements:
|
|
264
|
+
- - "~>"
|
|
265
|
+
- !ruby/object:Gem::Version
|
|
266
|
+
version: '1.0'
|
|
267
|
+
- - ">="
|
|
268
|
+
- !ruby/object:Gem::Version
|
|
269
|
+
version: 1.0.8
|
|
270
|
+
- !ruby/object:Gem::Dependency
|
|
271
|
+
name: gitmoji-regex
|
|
272
|
+
requirement: !ruby/object:Gem::Requirement
|
|
273
|
+
requirements:
|
|
274
|
+
- - "~>"
|
|
275
|
+
- !ruby/object:Gem::Version
|
|
276
|
+
version: '2.0'
|
|
277
|
+
- - ">="
|
|
278
|
+
- !ruby/object:Gem::Version
|
|
279
|
+
version: 2.0.11
|
|
280
|
+
type: :development
|
|
281
|
+
prerelease: false
|
|
282
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
283
|
+
requirements:
|
|
284
|
+
- - "~>"
|
|
285
|
+
- !ruby/object:Gem::Version
|
|
286
|
+
version: '2.0'
|
|
287
|
+
- - ">="
|
|
288
|
+
- !ruby/object:Gem::Version
|
|
289
|
+
version: 2.0.11
|
|
290
|
+
description: "☯️ Kramdown-backed Markdown provider gem for the Structured Merge Markdown
|
|
291
|
+
family."
|
|
70
292
|
email:
|
|
71
|
-
-
|
|
293
|
+
- floss@galtzo.com
|
|
72
294
|
executables: []
|
|
73
295
|
extensions: []
|
|
74
296
|
extra_rdoc_files: []
|
|
75
297
|
files:
|
|
298
|
+
- LICENSE.md
|
|
299
|
+
- README.md
|
|
76
300
|
- lib/kramdown-merge.rb
|
|
77
301
|
- lib/kramdown/merge.rb
|
|
302
|
+
- lib/kramdown/merge/backend.rb
|
|
78
303
|
- lib/kramdown/merge/version.rb
|
|
304
|
+
- sig/kramdown/merge.rbs
|
|
79
305
|
homepage: https://github.com/structuredmerge/structuredmerge-ruby
|
|
80
306
|
licenses:
|
|
81
307
|
- AGPL-3.0-only
|
|
82
308
|
- PolyForm-Small-Business-1.0.0
|
|
83
309
|
metadata:
|
|
84
310
|
homepage_uri: https://structuredmerge.org
|
|
85
|
-
source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.
|
|
86
|
-
changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.
|
|
311
|
+
source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.1
|
|
312
|
+
changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.1/CHANGELOG.md
|
|
87
313
|
bug_tracker_uri: https://github.com/structuredmerge/structuredmerge-ruby/issues
|
|
88
|
-
documentation_uri: https://www.rubydoc.info/gems/kramdown-merge/7.
|
|
314
|
+
documentation_uri: https://www.rubydoc.info/gems/kramdown-merge/7.1.1
|
|
89
315
|
funding_uri: https://github.com/sponsors/pboling
|
|
90
316
|
wiki_uri: https://github.com/structuredmerge/structuredmerge-ruby/wiki
|
|
317
|
+
news_uri: https://www.railsbling.com/tags/kramdown-merge
|
|
91
318
|
discord_uri: https://discord.gg/3qme4XHNKN
|
|
319
|
+
mailing_list_uri: https://www.rubyforum.org/tag/structuredmerge
|
|
92
320
|
rubygems_mfa_required: 'true'
|
|
93
|
-
rdoc_options:
|
|
321
|
+
rdoc_options:
|
|
322
|
+
- "--title"
|
|
323
|
+
- kramdown-merge - ☯️ Structured Merge Kramdown-backed Markdown analysis for Ruby
|
|
324
|
+
- "--main"
|
|
325
|
+
- README.md
|
|
326
|
+
- "--exclude"
|
|
327
|
+
- "^sig/"
|
|
328
|
+
- "--line-numbers"
|
|
329
|
+
- "--inline-source"
|
|
330
|
+
- "--quiet"
|
|
94
331
|
require_paths:
|
|
95
332
|
- lib
|
|
96
333
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
@@ -104,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
104
341
|
- !ruby/object:Gem::Version
|
|
105
342
|
version: '0'
|
|
106
343
|
requirements: []
|
|
107
|
-
rubygems_version: 4.0.
|
|
344
|
+
rubygems_version: 4.0.17
|
|
108
345
|
specification_version: 4
|
|
109
|
-
summary: Structured Merge Kramdown-backed Markdown analysis for Ruby
|
|
346
|
+
summary: "☯️ Structured Merge Kramdown-backed Markdown analysis for Ruby"
|
|
110
347
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|