html-pipeline 2.14.3 → 3.0.0.pre1
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
- data/.github/FUNDING.yml +11 -3
- data/.github/dependabot.yml +20 -0
- data/.github/workflows/automerge.yml +34 -0
- data/.github/workflows/lint.yml +23 -0
- data/.github/workflows/tag_and_release.yml +70 -0
- data/.github/workflows/test.yml +33 -0
- data/.rubocop.yml +17 -0
- data/CHANGELOG.md +28 -2
- data/Gemfile +29 -15
- data/{LICENSE → LICENSE.txt} +2 -2
- data/README.md +209 -218
- data/Rakefile +14 -7
- data/UPGRADING.md +35 -0
- data/html-pipeline.gemspec +31 -21
- data/lib/html-pipeline.rb +3 -0
- data/lib/html_pipeline/convert_filter/markdown_filter.rb +26 -0
- data/lib/html_pipeline/convert_filter.rb +17 -0
- data/lib/html_pipeline/filter.rb +89 -0
- data/lib/{html/pipeline → html_pipeline/node_filter}/absolute_source_filter.rb +23 -21
- data/lib/{html/pipeline → html_pipeline/node_filter}/emoji_filter.rb +58 -54
- data/lib/html_pipeline/node_filter/https_filter.rb +22 -0
- data/lib/html_pipeline/node_filter/image_max_width_filter.rb +40 -0
- data/lib/{html/pipeline/@mention_filter.rb → html_pipeline/node_filter/mention_filter.rb} +55 -69
- data/lib/html_pipeline/node_filter/table_of_contents_filter.rb +68 -0
- data/lib/html_pipeline/node_filter/team_mention_filter.rb +105 -0
- data/lib/html_pipeline/node_filter.rb +31 -0
- data/lib/html_pipeline/sanitization_filter.rb +65 -0
- data/lib/{html/pipeline → html_pipeline/text_filter}/image_filter.rb +3 -3
- data/lib/{html/pipeline → html_pipeline/text_filter}/plain_text_input_filter.rb +3 -5
- data/lib/html_pipeline/text_filter.rb +21 -0
- data/lib/html_pipeline/version.rb +5 -0
- data/lib/html_pipeline.rb +252 -0
- metadata +52 -54
- data/.travis.yml +0 -43
- data/Appraisals +0 -19
- data/CONTRIBUTING.md +0 -60
- data/bin/html-pipeline +0 -78
- data/lib/html/pipeline/@team_mention_filter.rb +0 -99
- data/lib/html/pipeline/autolink_filter.rb +0 -34
- data/lib/html/pipeline/body_content.rb +0 -44
- data/lib/html/pipeline/camo_filter.rb +0 -105
- data/lib/html/pipeline/email_reply_filter.rb +0 -69
- data/lib/html/pipeline/filter.rb +0 -165
- data/lib/html/pipeline/https_filter.rb +0 -29
- data/lib/html/pipeline/image_max_width_filter.rb +0 -37
- data/lib/html/pipeline/markdown_filter.rb +0 -56
- data/lib/html/pipeline/sanitization_filter.rb +0 -144
- data/lib/html/pipeline/syntax_highlight_filter.rb +0 -50
- data/lib/html/pipeline/text_filter.rb +0 -16
- data/lib/html/pipeline/textile_filter.rb +0 -25
- data/lib/html/pipeline/toc_filter.rb +0 -69
- data/lib/html/pipeline/version.rb +0 -7
- data/lib/html/pipeline.rb +0 -210
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b8171e0970d8cbe50757505138bbea0f812c06583cfcdfd192686a8aff9cb53
|
4
|
+
data.tar.gz: 19a40ef93871f3d2b6411c526d6375a21d494a301d7a4abb2e92b6062de81b1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c160dcf8463cc5009d397529087c9f035cb3ae5e998c12ace03810fd8146b031f5f28829e318456239cd410d41fbf3d1da7d0b0e8097ceb3206733a96484c5f
|
7
|
+
data.tar.gz: 72fa1ec6b3a2097dd0ce6108f55a10ac9b617e5fc607e67818876c5b8ececbc7c2bbd58e53ce530ba39f11f6ad0c292ec956e9e42fbed370213abc5b71bcf257
|
data/.github/FUNDING.yml
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
+
# These are supported funding model platforms
|
2
|
+
|
1
3
|
github: gjtorikian
|
2
|
-
patreon: gjtorikian
|
3
|
-
open_collective: garen-torikian
|
4
|
-
|
4
|
+
# patreon: gjtorikian
|
5
|
+
# open_collective: garen-torikian
|
6
|
+
#ko_fi: # Replace with a single Ko-fi username
|
7
|
+
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
+
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
#liberapay: # Replace with a single Liberapay username
|
10
|
+
# issuehunt: gjtorikian
|
11
|
+
#otechie: # Replace with a single Otechie username
|
12
|
+
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
@@ -0,0 +1,20 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: "github-actions"
|
4
|
+
directory: "/"
|
5
|
+
schedule:
|
6
|
+
interval: daily
|
7
|
+
time: "09:00"
|
8
|
+
timezone: "Etc/UTC"
|
9
|
+
open-pull-requests-limit: 10
|
10
|
+
|
11
|
+
- package-ecosystem: "bundler"
|
12
|
+
directory: "/"
|
13
|
+
schedule:
|
14
|
+
interval: daily
|
15
|
+
time: "09:00"
|
16
|
+
timezone: "Etc/UTC"
|
17
|
+
open-pull-requests-limit: 10
|
18
|
+
allow:
|
19
|
+
- dependency-name: "*"
|
20
|
+
dependency-type: "production"
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: PR auto-{approve,merge}
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request_target:
|
5
|
+
|
6
|
+
permissions:
|
7
|
+
pull-requests: write
|
8
|
+
contents: write
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
dependabot:
|
12
|
+
name: Dependabot
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
if: ${{ github.actor == 'dependabot[bot]' }}
|
16
|
+
steps:
|
17
|
+
- name: Fetch Dependabot metadata
|
18
|
+
id: dependabot-metadata
|
19
|
+
uses: dependabot/fetch-metadata@v1
|
20
|
+
with:
|
21
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
22
|
+
|
23
|
+
- name: Approve Dependabot PR
|
24
|
+
if: ${{steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'}}
|
25
|
+
run: gh pr review --approve "$PR_URL"
|
26
|
+
env:
|
27
|
+
PR_URL: ${{github.event.pull_request.html_url}}
|
28
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
29
|
+
|
30
|
+
- name: Merge Dependabot PR
|
31
|
+
run: gh pr merge --auto --squash "$PR_URL"
|
32
|
+
env:
|
33
|
+
PR_URL: ${{ github.event.pull_request.html_url }}
|
34
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Linting
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
paths:
|
6
|
+
- "**/*.rb"
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: read
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: 3.1.0
|
19
|
+
rubygems: latest
|
20
|
+
bundler-cache: true
|
21
|
+
- run: bundle install
|
22
|
+
- name: Rubocop
|
23
|
+
run: bundle exec rake rubocop
|
@@ -0,0 +1,70 @@
|
|
1
|
+
name: Tag and Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- main
|
8
|
+
paths:
|
9
|
+
- "lib/html_pipeline/version.rb"
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
release:
|
13
|
+
env:
|
14
|
+
GEM_NAME: html-pipeline
|
15
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
16
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_BOT_KEY }}
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v3
|
20
|
+
|
21
|
+
- name: Set up Ruby 3.1
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: 3.1
|
25
|
+
bundler-cache: true
|
26
|
+
|
27
|
+
- name: Configure Git
|
28
|
+
run: |
|
29
|
+
git config --local user.email "actions@github.com"
|
30
|
+
git config --local user.name "Actions Auto Build"
|
31
|
+
|
32
|
+
- name: Get current version
|
33
|
+
id: version-label
|
34
|
+
run: |
|
35
|
+
VERSION=$(grep VERSION lib/html_pipeline/version.rb | head -n 1 | cut -d'"' -f2)
|
36
|
+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
37
|
+
|
38
|
+
- name: Create tag
|
39
|
+
run: |
|
40
|
+
git tag -a v${{ steps.version-label.outputs.version }} -m "Release v${{ steps.version-label.outputs.version }}"
|
41
|
+
git push origin --tags
|
42
|
+
|
43
|
+
- name: Generate CHANGELOG.md
|
44
|
+
id: changelog
|
45
|
+
run: script/generate_changelog
|
46
|
+
|
47
|
+
- name: Commit & Push Changelog
|
48
|
+
run: |
|
49
|
+
git config --local user.email "actions@github.com"
|
50
|
+
git config --local user.name "Actions Auto Build"
|
51
|
+
git add -f CHANGELOG.md
|
52
|
+
git commit -m "docs: update changelog" || true
|
53
|
+
git push
|
54
|
+
|
55
|
+
- name: Publish release
|
56
|
+
env:
|
57
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
58
|
+
run: |
|
59
|
+
gh release create v${{ steps.version-label.outputs.version }} --generate-notes
|
60
|
+
|
61
|
+
- name: Publish to RubyGems
|
62
|
+
run: |
|
63
|
+
mkdir -p $HOME/.gem
|
64
|
+
touch $HOME/.gem/credentials
|
65
|
+
chmod 0600 $HOME/.gem/credentials
|
66
|
+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_BOT_KEY}\n" > $HOME/.gem/credentials
|
67
|
+
bundle exec rake package
|
68
|
+
for gem in pkg/html-pipeline-${{ steps.version-label.outputs.version }}*.gem ; do
|
69
|
+
gem push "$gem" --host https://rubygems.org
|
70
|
+
done
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
|
6
|
+
permissions:
|
7
|
+
contents: read
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
strategy:
|
14
|
+
fail-fast: true
|
15
|
+
matrix:
|
16
|
+
ruby-version:
|
17
|
+
- 3.1.0
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v3
|
21
|
+
|
22
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby-version }}
|
26
|
+
rubygems: latest
|
27
|
+
bundler-cache: true
|
28
|
+
|
29
|
+
- name: Install dependencies
|
30
|
+
run: bundle install
|
31
|
+
|
32
|
+
- name: Run tests
|
33
|
+
run: bundle exec rake test
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
inherit_gem:
|
2
|
+
rubocop-standard:
|
3
|
+
- config/default.yml
|
4
|
+
- config/minitest.yml
|
5
|
+
|
6
|
+
inherit_mode:
|
7
|
+
merge:
|
8
|
+
- Exclude
|
9
|
+
|
10
|
+
AllCops:
|
11
|
+
Exclude:
|
12
|
+
- test/progit/**/*
|
13
|
+
- "pkg/**/*"
|
14
|
+
- "ext/**/*"
|
15
|
+
- "vendor/**/*"
|
16
|
+
- "tmp/**/*"
|
17
|
+
- "test/progit/**/*"
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,34 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v3.0.0.pre1](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre1) (2022-12-30)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.14.
|
5
|
+
[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.14.3...v3.0.0.pre1)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- Allow `loading` attribute on images [\#359](https://github.com/gjtorikian/html-pipeline/issues/359)
|
10
|
+
- Allow picture tag in sanitation [\#352](https://github.com/gjtorikian/html-pipeline/issues/352)
|
11
|
+
- V3 ideas [\#350](https://github.com/gjtorikian/html-pipeline/issues/350)
|
12
|
+
- Invalid and missing HTML elements in the sanatizer [\#342](https://github.com/gjtorikian/html-pipeline/issues/342)
|
13
|
+
- Cellpadding & Cellspacing are not supported in HTML5. [\#303](https://github.com/gjtorikian/html-pipeline/issues/303)
|
14
|
+
|
15
|
+
**Merged pull requests:**
|
16
|
+
|
17
|
+
- Drop SyntaxHighlightFilter [\#372](https://github.com/gjtorikian/html-pipeline/pull/372) ([gjtorikian](https://github.com/gjtorikian))
|
18
|
+
- Close sanitization-related issues [\#371](https://github.com/gjtorikian/html-pipeline/pull/371) ([gjtorikian](https://github.com/gjtorikian))
|
19
|
+
- Update Selma signatures [\#370](https://github.com/gjtorikian/html-pipeline/pull/370) ([gjtorikian](https://github.com/gjtorikian))
|
20
|
+
- You shall pass [\#369](https://github.com/gjtorikian/html-pipeline/pull/369) ([gjtorikian](https://github.com/gjtorikian))
|
21
|
+
- Migrate from Nokogiri to Selma [\#368](https://github.com/gjtorikian/html-pipeline/pull/368) ([gjtorikian](https://github.com/gjtorikian))
|
22
|
+
- Split filters up [\#360](https://github.com/gjtorikian/html-pipeline/pull/360) ([gjtorikian](https://github.com/gjtorikian))
|
23
|
+
- Support multiple dependencies per filter [\#351](https://github.com/gjtorikian/html-pipeline/pull/351) ([gjtorikian](https://github.com/gjtorikian))
|
24
|
+
- Add Rubocop [\#349](https://github.com/gjtorikian/html-pipeline/pull/349) ([gjtorikian](https://github.com/gjtorikian))
|
25
|
+
- add truffleruby-head [\#348](https://github.com/gjtorikian/html-pipeline/pull/348) ([gogainda](https://github.com/gogainda))
|
26
|
+
- V3 Release [\#347](https://github.com/gjtorikian/html-pipeline/pull/347) ([gjtorikian](https://github.com/gjtorikian))
|
27
|
+
- Switch to GitHub Actions [\#346](https://github.com/gjtorikian/html-pipeline/pull/346) ([gjtorikian](https://github.com/gjtorikian))
|
28
|
+
|
29
|
+
## [v2.14.3](https://github.com/gjtorikian/html-pipeline/tree/v2.14.3) (2022-10-14)
|
30
|
+
|
31
|
+
[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.14.2...v2.14.3)
|
6
32
|
|
7
33
|
**Closed issues:**
|
8
34
|
|
data/Gemfile
CHANGED
@@ -1,26 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
source
|
3
|
+
source "https://rubygems.org"
|
4
4
|
|
5
5
|
# Specify your gem's dependencies in html-pipeline.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
+
gem "awesome_print"
|
9
|
+
|
10
|
+
gem "rubocop"
|
11
|
+
gem "rubocop-standard"
|
12
|
+
|
13
|
+
gem "github_changelog_generator", "~> 1.16"
|
14
|
+
|
15
|
+
gem "sorbet-runtime"
|
16
|
+
|
17
|
+
group :development, :test do
|
18
|
+
gem "amazing_print"
|
19
|
+
gem "debug"
|
20
|
+
end
|
21
|
+
|
8
22
|
group :development do
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
23
|
+
gem "tapioca", require: false
|
24
|
+
gem "sorbet"
|
25
|
+
gem "bundler"
|
26
|
+
gem "rake"
|
12
27
|
end
|
13
28
|
|
14
29
|
group :test do
|
15
|
-
gem
|
16
|
-
gem
|
17
|
-
gem
|
18
|
-
gem
|
19
|
-
|
20
|
-
gem
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
gem
|
25
|
-
gem 'minitest-focus', '~> 1.1'
|
30
|
+
gem "commonmarker", "~> 1.0.0.pre4", require: false
|
31
|
+
gem "gemoji", "~> 3.0", require: false
|
32
|
+
gem "gemojione", "~> 4.3", require: false
|
33
|
+
gem "minitest"
|
34
|
+
|
35
|
+
gem "minitest-bisect", "~> 1.6"
|
36
|
+
|
37
|
+
gem "nokogiri", "~> 1.13"
|
38
|
+
|
39
|
+
gem "minitest-focus", "~> 1.1"
|
26
40
|
end
|
data/{LICENSE → LICENSE.txt}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2023 Garen Torikian
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|