html-pipeline 3.0.2 → 3.1.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: ad9e9991f181f9b708acdb8b5ba27537e759f3f87cd624c2587e248524747f0f
4
- data.tar.gz: ffaa220bac349aedd97a240de688c6ef0abe44b947a8aedd9df804fc13057e71
3
+ metadata.gz: 6e2a7f31bce55f6322a50e73b85563f2fba04bf3f4c9ff4e2ca1ff96eee67cf5
4
+ data.tar.gz: e3dd6a9dce021263af0843f3e2a403fedf5af1160775f3978e0d53dd6ce23554
5
5
  SHA512:
6
- metadata.gz: 41179127f775429b7de505c334d76a22771a903a9bcfb4fe6c47c344aae6fa94b92d15a66fb41bb61657924a5360548858ee7c7daac08476c2b72be73f355230
7
- data.tar.gz: 1f937f9f2eee0ea99d5d8c1069648f10c8702da88524057e70aa1ca691be1a49bf645f249bdb07b6d4ccc8c9620ec463ca85f2285274cfee29a3f052368128c9
6
+ metadata.gz: 5c9b62d0f05e468625bf6695d98e795d1b030f71660487560eeaa4a947504d27e20bdd2ee0752cb55700a4b6700c5f7e0b0d2ab0f7368e3285f2738b17ac2612
7
+ data.tar.gz: 264f57da184b93b195d409005e1bca1125809f2fa65fc2992af23556033da6289ed6b15b8e044f3d9f2c162fa230a63a97df473a045d10c3cbd2dcffe8d80a73
data/CHANGELOG.md CHANGED
@@ -1,42 +1,79 @@
1
+ ## [v3.0.3] - 02-02-2024
2
+
3
+ ## What's Changed
4
+
5
+ - Fix typo in README by @ppworks in https://github.com/gjtorikian/html-pipeline/pull/394
6
+ - Prevent exception by @ppworks in https://github.com/gjtorikian/html-pipeline/pull/395
7
+ - Cut 3.0.3 by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/396
8
+
9
+ ## New Contributors
10
+
11
+ - @ppworks made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/394
12
+
13
+ **Full Changelog**: https://github.com/gjtorikian/html-pipeline/compare/v3.0.2...v3.0.3
14
+
15
+ ## [v3.0.2] - 08-01-2024
16
+
17
+ ## What's Changed
18
+
19
+ - README.md: Fix example code by @grekko in https://github.com/gjtorikian/html-pipeline/pull/390
20
+ - Allow pipeline to run without node filters by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/392
21
+
22
+ ## New Contributors
23
+
24
+ - @grekko made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/390
25
+
26
+ **Full Changelog**: https://github.com/gjtorikian/html-pipeline/compare/v3.0.1...v3.0.2
27
+
1
28
  ## [v3.0.1] - 28-12-2023
29
+
2
30
  ## What's Changed
3
- * Handle odd numbers of NodeFilters to be configured by @stevehill1981 in https://github.com/gjtorikian/html-pipeline/pull/389
31
+
32
+ - Handle odd numbers of NodeFilters to be configured by @stevehill1981 in https://github.com/gjtorikian/html-pipeline/pull/389
4
33
 
5
34
  ## New Contributors
6
- * @stevehill1981 made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/389
35
+
36
+ - @stevehill1981 made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/389
7
37
 
8
38
  **Full Changelog**: https://github.com/gjtorikian/html-pipeline/compare/v3.0.0...v3.0.1
39
+
9
40
  ## [v3.0.0] - 24-12-2023
41
+
10
42
  ## What's Changed
11
- * Switch to GitHub Actions by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/346
12
- * add truffleruby-head by @gogainda in https://github.com/gjtorikian/html-pipeline/pull/348
13
- * Add Rubocop by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/349
14
- * Support multiple dependencies per filter by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/351
15
- * Split filters up by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/360
16
- * Migrate from Nokogiri to Selma by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/368
17
- * You shall pass by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/369
18
- * Update Selma signatures by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/370
19
- * Close sanitization-related issues by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/371
20
- * Drop SyntaxHighlightFilter by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/372
21
- * V3 Release by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/347
22
- * Use emoji from commonmarker by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/373
23
- * req convert_filter if filter present by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/375
24
- * Update selma requirement from ~> 0.0.1 to >= 0.0.1, < 0.2.0 by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/377
25
- * Add the AssetProxyFilter by @digitalmoksha in https://github.com/gjtorikian/html-pipeline/pull/379
26
- * Update rouge requirement from ~> 3.1 to ~> 4.1 by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/381
27
- * Update gemoji requirement from ~> 3.0 to ~> 4.1 by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/382
28
- * Have Zeitwerk not automatically load filters by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/383
29
- * Bump the github-actions group with 1 update by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/384
30
- * :gem: 3.0.0 by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/386
43
+
44
+ - Switch to GitHub Actions by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/346
45
+ - add truffleruby-head by @gogainda in https://github.com/gjtorikian/html-pipeline/pull/348
46
+ - Add Rubocop by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/349
47
+ - Support multiple dependencies per filter by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/351
48
+ - Split filters up by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/360
49
+ - Migrate from Nokogiri to Selma by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/368
50
+ - You shall pass by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/369
51
+ - Update Selma signatures by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/370
52
+ - Close sanitization-related issues by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/371
53
+ - Drop SyntaxHighlightFilter by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/372
54
+ - V3 Release by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/347
55
+ - Use emoji from commonmarker by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/373
56
+ - req convert_filter if filter present by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/375
57
+ - Update selma requirement from ~> 0.0.1 to >= 0.0.1, < 0.2.0 by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/377
58
+ - Add the AssetProxyFilter by @digitalmoksha in https://github.com/gjtorikian/html-pipeline/pull/379
59
+ - Update rouge requirement from ~> 3.1 to ~> 4.1 by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/381
60
+ - Update gemoji requirement from ~> 3.0 to ~> 4.1 by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/382
61
+ - Have Zeitwerk not automatically load filters by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/383
62
+ - Bump the github-actions group with 1 update by @dependabot in https://github.com/gjtorikian/html-pipeline/pull/384
63
+ - :gem: 3.0.0 by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/386
31
64
 
32
65
  ## New Contributors
33
- * @gogainda made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/348
34
- * @dependabot made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/377
35
- * @digitalmoksha made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/379
66
+
67
+ - @gogainda made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/348
68
+ - @dependabot made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/377
69
+ - @digitalmoksha made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/379
36
70
 
37
71
  **Full Changelog**: https://github.com/gjtorikian/html-pipeline/compare/v2.14.3...v3.0.0
72
+
38
73
  ## [v3.0.0.pre6] - 16-08-2023
74
+
39
75
  null
76
+
40
77
  # Changelog
41
78
 
42
79
  ## [v3.0.0.pre5](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre5) (2023-06-05)
@@ -67,7 +104,7 @@ null
67
104
 
68
105
  **Merged pull requests:**
69
106
 
70
- - req convert\_filter if `text/node`filter present [\#375](https://github.com/gjtorikian/html-pipeline/pull/375) ([gjtorikian](https://github.com/gjtorikian))
107
+ - req convert_filter if `text/node`filter present [\#375](https://github.com/gjtorikian/html-pipeline/pull/375) ([gjtorikian](https://github.com/gjtorikian))
71
108
 
72
109
  ## [v3.0.0.pre2](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre2) (2023-01-26)
73
110
 
@@ -128,7 +165,7 @@ null
128
165
 
129
166
  **Merged pull requests:**
130
167
 
131
- - Replace EscapeUtils.escape\_html with CGI.escape\_html [\#365](https://github.com/gjtorikian/html-pipeline/pull/365) ([ramhoj](https://github.com/ramhoj))
168
+ - Replace EscapeUtils.escape_html with CGI.escape_html [\#365](https://github.com/gjtorikian/html-pipeline/pull/365) ([ramhoj](https://github.com/ramhoj))
132
169
 
133
170
  ## [v2.14.2](https://github.com/gjtorikian/html-pipeline/tree/v2.14.2) (2022-06-12)
134
171
 
@@ -300,7 +337,7 @@ null
300
337
 
301
338
  **Closed issues:**
302
339
 
303
- - New feature request for hashtags \# filter [\#301](https://github.com/gjtorikian/html-pipeline/issues/301)
340
+ - New feature request for hashtags \# filter [\#301](https://github.com/gjtorikian/html-pipeline/issues/301)
304
341
  - Whitelist srcset for responsive images [\#233](https://github.com/gjtorikian/html-pipeline/issues/233)
305
342
 
306
343
  **Merged pull requests:**
@@ -403,7 +440,7 @@ null
403
440
 
404
441
  - Set instrumentation name [\#275](https://github.com/gjtorikian/html-pipeline/pull/275) ([gjtorikian](https://github.com/gjtorikian))
405
442
  - Switch to CommonMark [\#274](https://github.com/gjtorikian/html-pipeline/pull/274) ([kivikakk](https://github.com/kivikakk))
406
- - add korgi to 3rd party extensions \[ci skip\] [\#271](https://github.com/gjtorikian/html-pipeline/pull/271) ([jodeci](https://github.com/jodeci))
443
+ - add korgi to 3rd party extensions \[ci skip\] [\#271](https://github.com/gjtorikian/html-pipeline/pull/271) ([jodeci](https://github.com/jodeci))
407
444
 
408
445
  ## [v2.5.0](https://github.com/gjtorikian/html-pipeline/tree/v2.5.0) (2017-01-13)
409
446
 
@@ -412,7 +449,7 @@ null
412
449
  **Closed issues:**
413
450
 
414
451
  - Add `<wbr>` to whitelist [\#265](https://github.com/gjtorikian/html-pipeline/issues/265)
415
- - Missing context keys for HTML::Pipeline::EmojiFilter: :asset\_root [\#262](https://github.com/gjtorikian/html-pipeline/issues/262)
452
+ - Missing context keys for HTML::Pipeline::EmojiFilter: :asset_root [\#262](https://github.com/gjtorikian/html-pipeline/issues/262)
416
453
  - Emoji \<img\> tags does not pass W3C validationg [\#234](https://github.com/gjtorikian/html-pipeline/issues/234)
417
454
  - Incompatible character encodings: ASCII-8BIT and UTF-8 in EmailReplyFilter [\#229](https://github.com/gjtorikian/html-pipeline/issues/229)
418
455
 
@@ -495,8 +532,8 @@ null
495
532
  **Merged pull requests:**
496
533
 
497
534
  - Release 2.2.2 [\#231](https://github.com/gjtorikian/html-pipeline/pull/231) ([jch](https://github.com/jch))
498
- - Fix for calling mention\_link\_filter with only one argument [\#230](https://github.com/gjtorikian/html-pipeline/pull/230) ([benbalter](https://github.com/benbalter))
499
- - Add html-pipeline-linkify\_github to 3rd Party Extensions \[ci skip\] [\#228](https://github.com/gjtorikian/html-pipeline/pull/228) ([JuanitoFatas](https://github.com/JuanitoFatas))
535
+ - Fix for calling mention_link_filter with only one argument [\#230](https://github.com/gjtorikian/html-pipeline/pull/230) ([benbalter](https://github.com/benbalter))
536
+ - Add html-pipeline-linkify_github to 3rd Party Extensions \[ci skip\] [\#228](https://github.com/gjtorikian/html-pipeline/pull/228) ([JuanitoFatas](https://github.com/JuanitoFatas))
500
537
 
501
538
  ## [v2.2.1](https://github.com/gjtorikian/html-pipeline/tree/v2.2.1) (2015-10-01)
502
539
 
@@ -552,7 +589,7 @@ null
552
589
  - Question - Can this work with Rouge? [\#166](https://github.com/gjtorikian/html-pipeline/issues/166)
553
590
  - Question about github markdown filter \(low priority!\) [\#165](https://github.com/gjtorikian/html-pipeline/issues/165)
554
591
  - Do not mention or emojify in a codeblock [\#163](https://github.com/gjtorikian/html-pipeline/issues/163)
555
- - MentionFilter base\_url config question [\#161](https://github.com/gjtorikian/html-pipeline/issues/161)
592
+ - MentionFilter base_url config question [\#161](https://github.com/gjtorikian/html-pipeline/issues/161)
556
593
  - Feature Request: Add "details" tag to whitelist [\#138](https://github.com/gjtorikian/html-pipeline/issues/138)
557
594
 
558
595
  **Merged pull requests:**
@@ -564,10 +601,10 @@ null
564
601
  - \[ci skip\] Fix CHANGELOG.md rendering. [\#177](https://github.com/gjtorikian/html-pipeline/pull/177) ([JuanitoFatas](https://github.com/JuanitoFatas))
565
602
  - Restrict nokogiri to specific versions [\#176](https://github.com/gjtorikian/html-pipeline/pull/176) ([simeonwillbanks](https://github.com/simeonwillbanks))
566
603
  - Use svg build badge. \[ci skip\] [\#175](https://github.com/gjtorikian/html-pipeline/pull/175) ([JuanitoFatas](https://github.com/JuanitoFatas))
567
- - Add 3rd party gem: html-pipeline-rouge\_filter. [\#174](https://github.com/gjtorikian/html-pipeline/pull/174) ([JuanitoFatas](https://github.com/JuanitoFatas))
568
- - MentionFilter\#link\_to\_mentioned\_user: Replace String introspection with Regexp match [\#172](https://github.com/gjtorikian/html-pipeline/pull/172) ([simeonwillbanks](https://github.com/simeonwillbanks))
604
+ - Add 3rd party gem: html-pipeline-rouge_filter. [\#174](https://github.com/gjtorikian/html-pipeline/pull/174) ([JuanitoFatas](https://github.com/JuanitoFatas))
605
+ - MentionFilter\#link_to_mentioned_user: Replace String introspection with Regexp match [\#172](https://github.com/gjtorikian/html-pipeline/pull/172) ([simeonwillbanks](https://github.com/simeonwillbanks))
569
606
  - Whitelist summary and details element. [\#171](https://github.com/gjtorikian/html-pipeline/pull/171) ([JuanitoFatas](https://github.com/JuanitoFatas))
570
- - Implement new context option: ignored\_ancestor\_tags to accept more ignored tags. [\#170](https://github.com/gjtorikian/html-pipeline/pull/170) ([JuanitoFatas](https://github.com/JuanitoFatas))
607
+ - Implement new context option: ignored_ancestor_tags to accept more ignored tags. [\#170](https://github.com/gjtorikian/html-pipeline/pull/170) ([JuanitoFatas](https://github.com/JuanitoFatas))
571
608
  - Support ~login for MentionFilter. [\#167](https://github.com/gjtorikian/html-pipeline/pull/167) ([JuanitoFatas](https://github.com/JuanitoFatas))
572
609
  - Add GitHub flavor Markdown Task List extension [\#162](https://github.com/gjtorikian/html-pipeline/pull/162) ([simeonwillbanks](https://github.com/simeonwillbanks))
573
610
  - Drop support for gemoji ~\> 1.0 [\#159](https://github.com/gjtorikian/html-pipeline/pull/159) ([jch](https://github.com/jch))
@@ -584,14 +621,14 @@ null
584
621
 
585
622
  **Closed issues:**
586
623
 
587
- - @mention\_filter should not replace mentions in style blocks. [\#143](https://github.com/gjtorikian/html-pipeline/issues/143)
624
+ - @mention_filter should not replace mentions in style blocks. [\#143](https://github.com/gjtorikian/html-pipeline/issues/143)
588
625
  - EmojiFilter doesn't work on strings that don't contain HTML [\#133](https://github.com/gjtorikian/html-pipeline/issues/133)
589
626
 
590
627
  **Merged pull requests:**
591
628
 
592
629
  - Search for text nodes on DocumentFragments without root tags [\#146](https://github.com/gjtorikian/html-pipeline/pull/146) ([Razer6](https://github.com/Razer6))
593
630
  - Don't filter @mentions in \<style\> tags [\#145](https://github.com/gjtorikian/html-pipeline/pull/145) ([jch](https://github.com/jch))
594
- - Prefer http\_url in HttpsFilter [\#142](https://github.com/gjtorikian/html-pipeline/pull/142) ([bkeepers](https://github.com/bkeepers))
631
+ - Prefer http_url in HttpsFilter [\#142](https://github.com/gjtorikian/html-pipeline/pull/142) ([bkeepers](https://github.com/bkeepers))
595
632
  - Don't check twice if there is a ':' in content \(EmojiFilter\) [\#141](https://github.com/gjtorikian/html-pipeline/pull/141) ([Razer6](https://github.com/Razer6))
596
633
 
597
634
  ## [v1.10.0](https://github.com/gjtorikian/html-pipeline/tree/v1.10.0) (2014-09-05)
@@ -623,7 +660,7 @@ null
623
660
  **Merged pull requests:**
624
661
 
625
662
  - Generalize https filter take 2 [\#131](https://github.com/gjtorikian/html-pipeline/pull/131) ([simeonwillbanks](https://github.com/simeonwillbanks))
626
- - Remove RUBY\_VERSION conditionals from gemspec [\#130](https://github.com/gjtorikian/html-pipeline/pull/130) ([mislav](https://github.com/mislav))
663
+ - Remove RUBY_VERSION conditionals from gemspec [\#130](https://github.com/gjtorikian/html-pipeline/pull/130) ([mislav](https://github.com/mislav))
627
664
  - Add compatibility with gemoji v2 [\#129](https://github.com/gjtorikian/html-pipeline/pull/129) ([mislav](https://github.com/mislav))
628
665
 
629
666
  ## [v1.8.0](https://github.com/gjtorikian/html-pipeline/tree/v1.8.0) (2014-04-04)
@@ -650,7 +687,7 @@ null
650
687
  **Closed issues:**
651
688
 
652
689
  - cut a 1.6.0 release [\#116](https://github.com/gjtorikian/html-pipeline/issues/116)
653
- - AutolinkFilter link\_attr doesn't seem to work [\#114](https://github.com/gjtorikian/html-pipeline/issues/114)
690
+ - AutolinkFilter link_attr doesn't seem to work [\#114](https://github.com/gjtorikian/html-pipeline/issues/114)
654
691
  - Spaces inserted into code [\#109](https://github.com/gjtorikian/html-pipeline/issues/109)
655
692
 
656
693
  **Merged pull requests:**
@@ -738,9 +775,9 @@ null
738
775
 
739
776
  **Merged pull requests:**
740
777
 
741
- - Add link\_attr option to Autolink filter [\#89](https://github.com/gjtorikian/html-pipeline/pull/89) ([excid3](https://github.com/excid3))
778
+ - Add link_attr option to Autolink filter [\#89](https://github.com/gjtorikian/html-pipeline/pull/89) ([excid3](https://github.com/excid3))
742
779
  - Update readme with link to asciidoc filter [\#87](https://github.com/gjtorikian/html-pipeline/pull/87) ([jch](https://github.com/jch))
743
- - use xml\_mini extracted from activesupport [\#85](https://github.com/gjtorikian/html-pipeline/pull/85) ([mojavelinux](https://github.com/mojavelinux))
780
+ - use xml_mini extracted from activesupport [\#85](https://github.com/gjtorikian/html-pipeline/pull/85) ([mojavelinux](https://github.com/mojavelinux))
744
781
  - Filters Manage Dependencies [\#80](https://github.com/gjtorikian/html-pipeline/pull/80) ([simeonwillbanks](https://github.com/simeonwillbanks))
745
782
 
746
783
  ## [v0.3.1](https://github.com/gjtorikian/html-pipeline/tree/v0.3.1) (2013-09-16)
@@ -808,7 +845,7 @@ null
808
845
  - Improve to describe gem 'github-linguist' [\#69](https://github.com/gjtorikian/html-pipeline/pull/69) ([tricknotes](https://github.com/tricknotes))
809
846
  - Bump version to 0.1.0. Follow semver. [\#68](https://github.com/gjtorikian/html-pipeline/pull/68) ([jch](https://github.com/jch))
810
847
  - Scope gem versions for Travis CI [\#67](https://github.com/gjtorikian/html-pipeline/pull/67) ([jch](https://github.com/jch))
811
- - Allow passing skip\_tags in autolink filter context [\#65](https://github.com/gjtorikian/html-pipeline/pull/65) ([pengwynn](https://github.com/pengwynn))
848
+ - Allow passing skip_tags in autolink filter context [\#65](https://github.com/gjtorikian/html-pipeline/pull/65) ([pengwynn](https://github.com/pengwynn))
812
849
  - Support non-English characters in anchor names [\#64](https://github.com/gjtorikian/html-pipeline/pull/64) ([jakedouglas](https://github.com/jakedouglas))
813
850
  - Fix the `AutolinkFilter` constant name. [\#57](https://github.com/gjtorikian/html-pipeline/pull/57) ([envygeeks](https://github.com/envygeeks))
814
851
  - resolves \#54 allow table section elements \(thead, tfoot, tbody\) [\#55](https://github.com/gjtorikian/html-pipeline/pull/55) ([mojavelinux](https://github.com/mojavelinux))
@@ -861,7 +898,7 @@ null
861
898
  **Merged pull requests:**
862
899
 
863
900
  - Add an html-pipeline executable to the gem [\#44](https://github.com/gjtorikian/html-pipeline/pull/44) ([indirect](https://github.com/indirect))
864
- - add result\[:mentioned\_usernames\] for MentionFilter [\#42](https://github.com/gjtorikian/html-pipeline/pull/42) ([fahchen](https://github.com/fahchen))
901
+ - add result\[:mentioned_usernames\] for MentionFilter [\#42](https://github.com/gjtorikian/html-pipeline/pull/42) ([fahchen](https://github.com/fahchen))
865
902
 
866
903
  ## [v0.0.8.1](https://github.com/gjtorikian/html-pipeline/tree/v0.0.8.1) (2013-03-03)
867
904
 
@@ -877,7 +914,7 @@ null
877
914
 
878
915
  **Merged pull requests:**
879
916
 
880
- - Bump escape\_utils [\#41](https://github.com/gjtorikian/html-pipeline/pull/41) ([brianmario](https://github.com/brianmario))
917
+ - Bump escape_utils [\#41](https://github.com/gjtorikian/html-pipeline/pull/41) ([brianmario](https://github.com/brianmario))
881
918
  - Don't monkeypatch Nokogiri in 1.9 [\#40](https://github.com/gjtorikian/html-pipeline/pull/40) ([defunkt](https://github.com/defunkt))
882
919
 
883
920
  ## [v0.0.8](https://github.com/gjtorikian/html-pipeline/tree/v0.0.8) (2013-02-07)
@@ -969,7 +1006,3 @@ null
969
1006
  - Ensure required context values are present [\#9](https://github.com/gjtorikian/html-pipeline/pull/9) ([juliamae](https://github.com/juliamae))
970
1007
  - emoji filter requires the emoji gem [\#8](https://github.com/gjtorikian/html-pipeline/pull/8) ([atmos](https://github.com/atmos))
971
1008
  - De-Github and opensource [\#6](https://github.com/gjtorikian/html-pipeline/pull/6) ([jch](https://github.com/jch))
972
-
973
-
974
-
975
- \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -10,8 +10,6 @@ gem "awesome_print"
10
10
  gem "rubocop"
11
11
  gem "rubocop-standard"
12
12
 
13
- gem "github_changelog_generator", "~> 1.16"
14
-
15
13
  gem "sorbet-runtime"
16
14
 
17
15
  group :development, :test do
data/README.md CHANGED
@@ -171,7 +171,7 @@ ALLOWLIST = {
171
171
 
172
172
  pipeline = HTMLPipeline.new \
173
173
  text_filters: [
174
- HTMLPipeline::MarkdownFilter,
174
+ HTMLPipeline::TextFilter::ImageFilter.new,
175
175
  ],
176
176
  convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new,
177
177
  sanitization_config: ALLOWLIST
@@ -199,7 +199,7 @@ the config:
199
199
  ```ruby
200
200
  pipeline = HTMLPipeline.new \
201
201
  text_filters: [
202
- HTMLPipeline::MarkdownFilter,
202
+ HTMLPipeline::TextFilter::ImageFilter.new,
203
203
  ],
204
204
  convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new,
205
205
  sanitization_config: nil
@@ -375,7 +375,7 @@ you to add additional elements. You can either modify the constant's value, or
375
375
  re-define your own config and pass that in, such as:
376
376
 
377
377
  ```ruby
378
- config = HTMLPipeline::SanitizerFilter::DEFAULT_CONFIG.dup
378
+ config = HTMLPipeline::SanitizationFilter::DEFAULT_CONFIG.dup
379
379
  config[:elements] << "iframe" # sure, whatever you want
380
380
  ```
381
381
 
data/UPGRADING.md CHANGED
@@ -14,10 +14,8 @@ The following filters were removed:
14
14
 
15
15
  - `AutolinkFilter`: this is handled by [Commonmarker](https://www.github.com/gjtorikian/commonmarker) and can be disabled/enabled through the `MarkdownFilter`'s `context` hash
16
16
  - `SanitizationFilter`: this is handled by [Selma](https://www.github.com/gjtorikian/selma); configuration can be done through the `sanitization_config` hash
17
-
18
17
  - `EmailReplyFilter`
19
18
  - `CamoFilter`
20
- - `TextFilter`
21
19
 
22
20
  ### Changed API
23
21
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "selma"
4
+
3
5
  class HTMLPipeline
4
6
  # A special filter with sanization routines and allowlists. This module defines
5
7
  # what HTML is allowed in user provided content and fixes up issues with
@@ -9,8 +9,8 @@ class HTMLPipeline
9
9
  # <img src="http://example.com/test.jpg" alt=""/>.
10
10
 
11
11
  class ImageFilter < TextFilter
12
- def call
13
- @text.gsub(%r{(https|http)?://.+\.(jpg|jpeg|bmp|gif|png)(\?\S+)?}i) do |match|
12
+ def call(text)
13
+ text.gsub(%r{(https|http)?://.+\.(jpg|jpeg|bmp|gif|png)(\?\S+)?}i) do |match|
14
14
  %(<img src="#{match}" alt=""/>)
15
15
  end
16
16
  end
@@ -5,8 +5,8 @@ class HTMLPipeline
5
5
  # Simple filter for plain text input. HTML escapes the text input and wraps it
6
6
  # in a div.
7
7
  class PlainTextInputFilter < TextFilter
8
- def call
9
- "<div>#{CGI.escapeHTML(@text)}</div>"
8
+ def call(text)
9
+ "<div>#{CGI.escapeHTML(text)}</div>"
10
10
  end
11
11
  end
12
12
  end
@@ -4,17 +4,17 @@ class HTMLPipeline
4
4
  class TextFilter < Filter
5
5
  attr_reader :text
6
6
 
7
- def initialize(text, context: {}, result: {})
8
- raise TypeError, "text must be a String" unless text.is_a?(String)
9
-
10
- # Ensure that this is always a string
11
- @text = text.respond_to?(:to_str) ? text.to_str : text.to_s
7
+ def initialize(context: {}, result: {})
12
8
  super(context: context, result: result)
13
9
  end
14
10
 
15
11
  class << self
16
- def call(input, context: {}, result: {})
17
- new(input, context: context, result: result).call
12
+ def call(text, context: {}, result: {})
13
+ raise TypeError, "text must be a String" unless text.is_a?(String)
14
+
15
+ # Ensure that this is always a string
16
+ text = text.respond_to?(:to_str) ? text.to_str : text.to_s
17
+ new(context: context, result: result).call(text)
18
18
  end
19
19
  end
20
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class HTMLPipeline
4
- VERSION = "3.0.2"
4
+ VERSION = "3.1.0"
5
5
  end
data/lib/html_pipeline.rb CHANGED
@@ -153,7 +153,7 @@ class HTMLPipeline
153
153
 
154
154
  if @text_filters.any?
155
155
  payload = default_payload({
156
- text_filters: @text_filters.map(&:name),
156
+ text_filters: @text_filters.map { |f| f.class.name },
157
157
  context: context,
158
158
  result: result,
159
159
  })
@@ -204,7 +204,7 @@ class HTMLPipeline
204
204
  # Returns the result of the filter.
205
205
  def perform_filter(filter, doc, context: {}, result: {})
206
206
  payload = default_payload({
207
- filter: filter.name,
207
+ filter: filter.class.name,
208
208
  context: context,
209
209
  result: result,
210
210
  })
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-08 00:00:00.000000000 Z
11
+ date: 2024-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selma
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: 3.3.22
113
113
  requirements: []
114
- rubygems_version: 3.5.4
114
+ rubygems_version: 3.4.6
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Helpers for processing content through a chain of filters