Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 10.9.0

* BREAKING: drops support for `embed:link` syntax
* Not a major version change as we don't see any usages of the syntax in the wild

## 10.8.5

* Update dependencies
Expand Down
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,30 +568,6 @@ will output a image section
</figure>
```

### Link

Links to different documents can be embedded so they change when the documents
they reference change.

A link to [embed:link:c636b433-1e5c-46d4-96b0-b5a168fac26c]

with options provided

{
links: [
{
url: "http://example.com",
title: "An excellent website",
}
]
}

will output

```html
<p>A link to <a href="http://example.com">An excellent website</a></p>
```

### Contact

[Contact:df62690f-34a0-4840-a7fa-4ef5acc18666]
Expand Down
11 changes: 0 additions & 11 deletions lib/govspeak.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,6 @@ def render_image(image)
end
end

extension("embed link", /\[embed:link:\s*(.*?)\s*\]/) do |content_id|
link = links.detect { |l| l[:content_id] == content_id }
next "" unless link

if link[:url]
"[#{link[:title]}](#{link[:url]})"
else
link[:title]
end
end

extension("Contact", /\[Contact:\s*(.*?)\s*\]/) do |content_id|
contact = contacts.detect { |c| c[:content_id] == content_id }
next "" unless contact
Expand Down
2 changes: 1 addition & 1 deletion lib/govspeak/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Govspeak
VERSION = "10.8.5".freeze
VERSION = "10.9.0".freeze
end
54 changes: 0 additions & 54 deletions test/govspeak_link_test.rb

This file was deleted.