Commit graph

8 commits

Author SHA1 Message Date
Oleksandr Redko 36ce3a4a9d Correct typos in Go comments 2023-03-02 16:32:32 +01:00
Bjørn Erik Pedersen d90e37e0c6 all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
Joe Mooring 58c0f5e617 Remove trailing hyphen from auto heading ID
Applicable when autoHeadingIDType is either `github` or `github-ascii`.

When autoHeadingIDType is `blackfriday`, the existing code removes
trailing whitespace while iterating through the characters, using
a boolean "futureDash" mechanism.

Fixes #6798
2020-07-05 14:13:02 +02:00
Bjørn Erik Pedersen 9b6e61464b
markup/goldmark: Adjust auto ID space handling
GitHub does not consider tabs as delimiter, see https://github.com/bep/portable-hugo-links/blob/master/blog/p2.md

Closes #6710
2020-01-05 15:58:14 +01:00
Bjørn Erik Pedersen 16e7c11203
markup/goldmark: Add an optional Blackfriday auto ID strategy
Fixes #6707
2020-01-05 11:56:05 +01:00
Bjørn Erik Pedersen 8f071fc159
markup/goldmark: Make the autoID type config a string
To potentially make room for one more.

See #6707
2020-01-05 11:29:22 +01:00
Bjørn Erik Pedersen 5ee1f0876f
markup/goldmark: Simplify code 2020-01-04 23:58:23 +01:00
Bjørn Erik Pedersen a82d2700fc
markup/goldmark: Make auto IDs GitHub compatible
You can turn off this behaviour:

```toml
[markup]
  [markup.goldmark]
    [markup.goldmark.parser]
      autoHeadingIDAsciiOnly = true
```
Note that the `anchorize` now adapts its behaviour depending on the default Markdown handler.

Fixes #6616
2020-01-04 19:46:01 +01:00