Don't linkify code blocks (#7859)

* Don't linkify code blocks

Signed-off-by: Robin Townsend <robin@robin.town>

* Put the linkify ignoreTags option in the right place

Signed-off-by: Robin Townsend <robin@robin.town>

* Add code to list of ignored linkification tags as well

Signed-off-by: Robin Townsend <robin@robin.town>

* Test that code blocks skip linkification

Signed-off-by: Robin Townsend <robin@robin.town>

* Move test to the right spot

Signed-off-by: Robin Townsend <robin@robin.town>

* Use a snapshot instead for test

Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
Robin 2022-05-02 20:26:37 -04:00 committed by GitHub
parent 7477a2df7d
commit 1c70696b10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 0 deletions

View file

@ -225,6 +225,8 @@ export const options = {
rel: 'noreferrer noopener',
},
ignoreTags: ['pre', 'code'],
className: 'linkified',
target: function(href: string, type: Type | string): string {