Skip to content

Commit

Permalink
Allow alert classnames in HTML sanitization. (#3820)
Browse files Browse the repository at this point in the history
* Allow alert classnames in HTML sanitization.

* Updated dartdoc_options.yaml

* No -dev in version.

* Update CHANGELOG.md

Co-authored-by: Luka S <github@jaffaketchup.dev>

---------

Co-authored-by: Luka S <github@jaffaketchup.dev>
  • Loading branch information
isoos and JaffaKetchup committed Jul 15, 2024
1 parent f6f93dd commit 1d00523
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 8.0.12

* Allow `markdown-alert` class names in HTML sanitization. (#3820)

## 8.0.11

* Fix the slash key (`/`) not focusing the search box. (#3810)
Expand Down
2 changes: 1 addition & 1 deletion dartdoc_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dartdoc:
linkToSource:
root: '.'
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v8.0.11/%f%#L%l%'
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v8.0.12/%f%#L%l%'
5 changes: 4 additions & 1 deletion lib/src/render/documentation_renderer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ class DocumentationRenderResult {
}

bool _allowClassName(String className) =>
className == 'deprecated' || className.startsWith('language-');
className == 'deprecated' ||
className.startsWith('language-') ||
className == 'markdown-alert' ||
className.startsWith('markdown-alert-');

Iterable<String> _addLinkRel(String uriString) {
final uri = Uri.tryParse(uriString);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const packageVersion = '8.0.11';
const packageVersion = '8.0.12';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dartdoc
version: 8.0.11
version: 8.0.12
description: A non-interactive HTML documentation generator for Dart source code.
repository: https://github.com/dart-lang/dartdoc

Expand Down

0 comments on commit 1d00523

Please sign in to comment.