markly 0.14.0 → 0.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 487f63b7eea5d3c60a7cf13c96de66b338d4b1617d2e7e6951b5410329548427
4
- data.tar.gz: 42b55e0aa850ec338ad66b03a8e75be8766e2de2d503d780f975587257140dcd
3
+ metadata.gz: 7eb58c81c8fca95217e5a1469baf3034785126d6ff42e9929a7d074e358b9508
4
+ data.tar.gz: f28760fe0280ce1ab132d7ec639584284dde3ba8077e68f2cd3617715d1211cb
5
5
  SHA512:
6
- metadata.gz: baac74312598fc9d95e0bfee6f3d5f53f92381470a0b667a8565766d171dfca591830390f4435aa84561c619f14f831bc154df58849e364ab9081958794a674d
7
- data.tar.gz: 2503c20036daa9d1ec67ca6ffe573bf2f443c346f981a8f1a20315821d2df67bf6eb7333b400490c56c97e8e501156583db33496ecca194262af1c7fc9ad9c6d
6
+ metadata.gz: ded6fff6a6355a8e78b2daa19a1581d982a35ddbcbddc38efe25d1866e9ce6136ea6eea62c1638874ff9953546a176df11e6ce462c9131ab38648185dec50a7a
7
+ data.tar.gz: ccc6eb379235978b3a512dee8553a425ca456b01e9f60b10d16927ae1862cda069152fcc62a02a1a60d46b274a1c8aa760183a636c528b8cdc7fdf43a367abd8
checksums.yaml.gz.sig CHANGED
Binary file
@@ -39,24 +39,13 @@ module Markly
39
39
  end
40
40
 
41
41
  def self.anchor_for(node)
42
- # Convert to plaintext, strip trailing whitespace, convert to lowercase
42
+ # Convert to plaintext, strip trailing whitespace, convert to lowercase:
43
43
  text = node.to_plaintext.chomp.downcase
44
44
 
45
- # Replace sequences of whitespace with hyphens
46
- text = text.gsub(/\s+/, "-")
45
+ # Replace sequences of whitespace with hyphens:
46
+ text.gsub!(/\s+/, "-")
47
47
 
48
- # Replace periods with hyphens (useful for version numbers like v1.0.0 → v1-0-0)
49
- text = text.gsub(/\./, "-")
50
-
51
- # Remove characters that are not URL-safe for anchors
52
- # Keep: letters, numbers, hyphens, underscores
53
- # Remove: punctuation, special characters, symbols
54
- text = text.gsub(/[^\w\-]/, "")
55
-
56
- # Remove leading/trailing hyphens and collapse multiple hyphens
57
- text = text.gsub(/^-+|-+$/, "").gsub(/-+/, "-")
58
-
59
- text
48
+ return text
60
49
  end
61
50
 
62
51
  def anchor_for(node)
@@ -7,5 +7,5 @@
7
7
  # Copyright, 2020-2025, by Samuel Williams.
8
8
 
9
9
  module Markly
10
- VERSION = "0.14.0"
10
+ VERSION = "0.14.1"
11
11
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
metadata.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- � "�}�ֹJd��ee�����{1'���}8S�#�P��~�7�IJ��$$���E�E��V\yw_�ߺWI�86�������+�����b�� w6ޅª�K����u�1zS�͛l|�2s�����d"_�v���QQ���R��8��/�^iU��z��+����"J�J5���(Zӹ�\n;(��"��?�<� �Bקd~�s��ѹ����� ��:��H�fPjQ��8/W��̤�7����ECT
2
- �&���H_w��jVA6�FT�Ԩv�
3
- nM<�x'#�G Uxk��UJ���d/׺�|�3ܘj6*"����eOU1��%7���[ 9��퀤+�`����=+A��_EUe}R���A93[.�n
1
+ +��;��}�B
2
+ ���|�CR ױ N ������ ���
3
+ �.�� ט��4���Bp�`��Lbp/�Fh�H]<.����)�$��$$n`����W�]�.n��׌�váA�-�{O��Rc"v����@�@���23D����$RY�ヮ��F�XR�oT���J��ѬP��