mirror of https://github.com/jpanther/congo.git
parent
d88f6c49be
commit
7810026589
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
"plugins": ["prettier-plugin-go-template"],
|
||||
"goTemplateBracketSpacing": true,
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"printWidth": 100,
|
||||
"singleQuote": false,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"trailingComma": "es5",
|
||||
"overrides": [
|
||||
{
|
||||
|
|
|
@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Extra whitespace added after links ([#679](https://github.com/jpanther/congo/issues/679))
|
||||
|
||||
## [2.7.1] - 2023-10-24
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -1 +1 @@
|
|||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="relative group">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"><a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a></span>{{ end }}</h{{ .Level }}>
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="relative group">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"><a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a></span>{{ end }}</h{{ .Level }}>
|
|
@ -61,4 +61,4 @@
|
|||
{{ with $caption }}<figcaption class="text-center">{{ . | markdownify }}</figcaption>{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,10 +1,11 @@
|
|||
{{ $link := .Destination }}
|
||||
{{ $isRemote := strings.HasPrefix $link "http" }}
|
||||
{{- if not $isRemote -}}
|
||||
{{ $url := urls.Parse .Destination }}
|
||||
{{- if $url.Path -}}
|
||||
{{ $fragment := "" }}
|
||||
{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
|
||||
{{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}}
|
||||
{{- end -}}
|
||||
<a href="{{ $link | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank" rel="noreferrer"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||
{{- if not $isRemote }}
|
||||
{{ $url := urls.Parse .Destination }}
|
||||
{{ if $url.Path }}
|
||||
{{ $fragment := "" }}
|
||||
{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
|
||||
{{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end -}}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
<a href="{{ $link | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank" rel="noreferrer"{{ end }}>{{- .Text | safeHTML -}}</a>
|
Loading…
Reference in New Issue