Commit graph

5 commits

Author SHA1 Message Date
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 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