- Use button component for buttons (PR#176)
- Allow
dataattributes ondivtags (PR#173)
- Change unicode testing characters after external gem change
- Move from govuk-lint to rubocop-govuk
- Allow version 6 of actionview
## 6.5.0
- Allow data attributes on links
- Add table heading syntax that allows a table cell outside of
theadto be marked as a table heading with a scope of row. (PR#161)
- Unicode characters forbidden in HTML are stripped from input
- Validation is now more lenient for HTML input
- Update warning callout label text from 'Help' to 'Warning'
- Remove experimental status on
AttachementLink:attachment-idandAttachement:attachment-id - Deprecate
embed:attachments:inline:content-id
- Fix wrapping
AttachmentLink:attachment-idin a paragraph when used inline
- Remove
[embed:attachments:content-id]this isn't used by any apps and has never worked - Add dependency on govuk_publishing_components
- Add new
AttachementLink:attachment-idextension and mark as experimental - Add new
Attachement:attachment-idextension and mark as experimental - Blockquote quote remover is now more forgiving to spaces before or after quote characters
- BREAKING CHANGE: Input is sanitized by default, to use unsafe HTML initialize with a sanitize option of false
- Allow sanitize option on remove invalid HTML from source input
- BREAKING CHANGE: Remove
to_sanitized_htmlmethod in favour ofsanitizeoption on initialize - BREAKING CHANGE: Remove
to_sanitized_html_without_imagesas no apps use this anymore - BREAKING CHANGE: Remove CLI usage
- Don't render
[Image: {file-name}]within a paragraph to avoid invalid HTML
- Add image credits to embedded images
- Add new
Image:image-idextension and deprecateembed:attachments:image:content-id
- Include locale, config and asset files in the gem distribution
- Update ActionView to 5.x
- Fix translation files not loading when gem is used in an app
- Change the data inputted into Contacts to match contacts schema #130
- Update sanitize version to 4.6.x #127
- Ignore links with blank or missing
hrefs when extracting links from a document withGovspeak::Document#extracted_links#124
- Add an optional
website_rootargument toGovspeak::Document#extracted_linksin order to get all links as fully qualified URLs #122
- Add a link extraction class for finding links in documents #120
- Fix rendering buttons with inconsistent linebreaks seen in publishing #118
- Fix validation to make sure buttons are considered valid
- Only allow buttons to be used on new lines, not when indented or inline within text (useful for guides) #116
- Add button component for govspeak #114 see README for usage
- Update Kramdown version to 1.15.0
- Fix matching links/attachments/contacts by regex to use equality #105
- Loosen ActionView dependency to allow use with Rails 5 #99
- Move presenters into the Govspeak namespace #93
- Embedded links now will automatically be marked with
rel="external"#96
- Update Kramdown version to 1.12.0
- Add pry-byebug to development dependencies
- Ability to run Govspeak as a binary from command line #87
- Uses hashes the primary interface for options to commands #89
- Adds the
[embed:attachments:image:%content_id%]extension #90 - Renders incorrect usages of embedding content as empty strings rather than outputting markdown 91
- Drop support for Ruby 1.9.3
- Update Ruby to 2.3.1
- Adds support for the following items for feature parity with whitehall:
{barchart}[embed:attachments:%content_id%][embed:attachments:inline:%content_id%][embed:link:%content_id%][Contact:%content_id%]
- Changes blockquote rendering to match whitehall #81
- Update Addressable version from 2.3.8 to 2.4.0
- Fix bug with link parsing introduced in Kramdown 1.6.0 with the "inline attribute lists" feature which clashed with our monkey patch #75
- Update minimum Kramdown version from 1.5.0 to 1.10.0 (changelog)
- Allow table columns to be left, right or centre aligned using the standard markdown pattern provided by Kramdown
- Yanked, see 3.6.1 which includes fix
- Fix a couple of issues with the header_extractor. The method now picks up headers nested inside
blocks, and when ID's are explicitly set. See alphagov#66 for more.
- Continue to support non-strict URIs in links on Ruby 2.2.x. See alphagov#57
- Add
{stat-headline}*10m* big numbers{/stat-headline}markdown for HTML publications asideelements are now allowed through the sanitization process.- Update Ruby from 1.9.3 to 2.1
- Increase the version of Kramdown to
1.5.0. This allows compatibility with Jekyll and the GitHub pages gem.
- Relax Nokogiri dependency to
1.5.xrather than1.5.10. This allows Govspeak to work with Rails 4.2 and greater.
spanelements are now allowed through the sanitization process.
- Fix a bug where address information could get mixed in with preceding paragraph text.
- Allow a call to
#valid?on aGovspeak::Documentto accept validation options.
- Add an
allowed_image_hostsoptions toHtmlValidator(andHtmlSanitizer) - BREAKING CHANGE: Added the
$EndLegislativeListtag which allows line breaks inLegislativeLists.
## 2.0.2
- Fix a bug with the HtmlValidator to do with kramdown now respecting character encodings of input data.
- Upgrade to newest kramdown, which fixes a number of bugs, including rendering multiple footnote references and handling underscores in attachment titles
- Upgrade sanitize dependency to 2.1.0
- Now allows
address,bdi,hrandsummaryelements by default. - Allows colons in IDs
- BREAKING CHANGE: This changes the validation rules of HtmlSanitizer.
- Now allows
- Stop duplicate entries in the sanitization config
- Fix a bug with parsing of
$LegislativeListand$PriorityListwith\r\nline endings.
- Fix a bug with parsing of
$LegislativeListand$PriorityListso that they are not matched when immediately preceeded by other text.
- Add
$LegislativeListto allow editors to insert lists with custom markers.
- Stop steps list regex matching newline.
- Nested Govspeak blocks are now parsed recursively using Govspeak. Among other things, this fixes the display of external links in callout blocks.
- Fixed over-eager step list matching.
- Fixed newline matching and operating over multiple list blocks.
- Added
$PriorityList:xconstruct to class the firstxlist items withprimary-item. - Fixed
rcovdependency.
- Added
#structured_headersmethod to provide heirarchically structured headers extracted from markdown text heading tags.