panr / hugo-theme-terminal

A simple, retro theme for Hugo
MIT License
1.96k stars 737 forks source link

Footnotes are not counted properly #462

Closed blakeashleyjr closed 2 weeks ago

blakeashleyjr commented 1 year ago

I am having a strange issue where footnotes are not counted properly. See the screenshot below:

image

I have also included the markdown for further troubleshooting.

Beyond the pain of losing the account, this exercise got me thinking about how much I actually had in that account and the privacy concerns related to it. Sure, a hacker, rogue employee, or future acquirer[^1] wouldn't be able to drain my bank account with access to my Todoist account, but they would have access to the inside of my thoughts, plans, and dreams going back almost a decade. The thought of so many people[^2], even without a malicious actor, makes me uncomfortable.

[^1]: From the Todoist Privacy Policy: "If we are involved in a merger, acquisition, bankruptcy, reorganization, partnership, asset sale or other transaction, we may disclose your Information as part of that transaction.
    - [https://edit.tosdr.org/points/13293](https://edit.tosdr.org/points/13293)
    - [https://doist.com/privacy](https://doist.com/privacy)

[^2]: Selected vendors and service providers Todoist shares data with, from the [Todoist Privacy Policy](https://doist.com/privacy) (see the full list in the privacy policy).
      - Cloud service providers who we rely on for data storage, including Microsoft Azure and Amazon Web Services who are based in the U.S.
      - Analytics providers. We work with a number of analytics, segmentation and mobile measurement service providers who help us understand our userbase. This includes Google LLC, which is based in the U.S.
      - Communications platform providers, who help us manage and send newsletters to you in relation to the Services. This includes SendGrid, Mailgun and MailChimp which are based in the U.S."

As you can see, the footnote is displayed as "4" when it is obviously the second footnote.

After more experimentation, it appears it is counting the list times towards the footnote count.

Firefox is blaming the following portion of main.scss for the counting:

ol {
  list-style: none;
  counter-reset: li;

  li {
    counter-increment: li;
  }

  li:before {
    content: counter(li);
    position: absolute;
    right: calc(100% + 10px);
    color: $accent;
    display: inline-block;
    text-align: right;
  }

  ol {
    margin-left: 38px;

    li {
      counter-increment: li;
    }

    li:before {
      content: counters(li, ".") " ";
    }
  }
}

content:counter(li); needs to exclude user-entered content.