zwbetz-gh / cupper-hugo-theme

An accessibility-friendly Hugo theme, ported from the original Cupper project.
https://cupper-hugo-theme.netlify.app/
MIT License
301 stars 190 forks source link

When using headings containing a link, the linked part gets lost #80

Closed WetenSchaap closed 1 year ago

WetenSchaap commented 1 year ago

Describe the bug

When a heading contains a link, the link is placed at the beginning of the heading, overwriting the rest of the heading.

To Reproduce

Steps to reproduce the behavior:

  1. Make a document with headings with links in them:
---
title: "Bibliography"
date: 2022-11-28
draft: false
---
## 2nd level heading

### 3rd level heading

### Heading containing a [link](https://gohugo.io/), and acts weird

### Heading containing a [longer link here](https://gohugo.io/), and you see it better
  1. See error:

image

Expected behavior Links are simply part of the heading.

Desktop (please complete the following information):

zwbetz-gh commented 1 year ago

Hi @WetenSchaap - thanks for reporting this. It's been fixed in https://github.com/zwbetz-gh/cupper-hugo-theme/commit/711a53bfa8925d81097895517ea16d0cc7a8de7c.

zwbetz-gh commented 1 year ago

Here's a demo of the fix, for reference: https://cupper-hugo-theme.netlify.app/heading-link-test/