Compare commits
	
		
			No commits in common. "431d4b0990a5882d203dcf45388e628feb54c56f" and "85ea55402e6efae552349790fed1924f8d77ac82" have entirely different histories.
		
	
	
		
			431d4b0990
			...
			85ea55402e
		
	
		
| @ -478,24 +478,3 @@ blockquote { | |||||||
| .side-by-side-item { | .side-by-side-item { | ||||||
|   flex-basis: 0; |   flex-basis: 0; | ||||||
| } | } | ||||||
| 
 |  | ||||||
| .internal-ref { |  | ||||||
|   text-decoration: underline; |  | ||||||
|   break-inside: avoid; |  | ||||||
| 
 |  | ||||||
|   &:target { |  | ||||||
|     @include var(background-color, target-background-color); |  | ||||||
|     border-radius: 1rem; |  | ||||||
| 
 |  | ||||||
|     .internal-ref-counter { |  | ||||||
|       @include var(background-color, target-background-color); |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .internal-ref-counter { |  | ||||||
|   display: inline-block; |  | ||||||
|   border: $standard-border; |  | ||||||
|   border-radius: 0.5rem; |  | ||||||
|   padding: 0 0.25rem 0 0.25rem; |  | ||||||
| } |  | ||||||
|  | |||||||
| @ -18,24 +18,6 @@ | |||||||
| {{- $scratch.Set "hidden" (.Get 5) -}} | {{- $scratch.Set "hidden" (.Get 5) -}} | ||||||
| {{- end -}} | {{- end -}} | ||||||
| 
 | 
 | ||||||
| {{- if or (.Page.Params.left_align_code) (.Get 6) -}} |  | ||||||
| {{- $scratch.Set "prefixLength" -1 -}} |  | ||||||
| {{- range $line := $lines -}} |  | ||||||
| {{- $leading := sub (len $line) (len (strings.TrimLeft " " $line)) -}} |  | ||||||
| {{- if and (ne $line "") (or (eq ($scratch.Get "prefixLength") -1) (le $leading ($scratch.Get "prefixLength"))) -}} |  | ||||||
| {{- $scratch.Set "prefixLength" $leading -}} |  | ||||||
| {{- end -}} |  | ||||||
| {{- end -}} |  | ||||||
| 
 |  | ||||||
| {{- $scratch.Set "joinedLines" "" -}} |  | ||||||
| {{- range $line := $lines -}} |  | ||||||
| {{- $scratch.Add "joinedLines" (substr $line ($scratch.Get "prefixLength")) -}} |  | ||||||
| {{- $scratch.Add "joinedLines" "\n" -}} |  | ||||||
| {{- end -}} |  | ||||||
| {{- else -}} |  | ||||||
| {{- $scratch.Set "joinedLines" (delimit $lines "\n") -}} |  | ||||||
| {{- end -}} |  | ||||||
| 
 |  | ||||||
| {{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 1) "lines" (slice (.Get 2) (.Get 3))) -}} | {{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 1) "lines" (slice (.Get 2) (.Get 3))) -}} | ||||||
| {{- partial "linerangestr.html" (dict "scratch" $scratch "from" (.Get 2) "to" (.Get 3)) -}} | {{- partial "linerangestr.html" (dict "scratch" $scratch "from" (.Get 2) "to" (.Get 3)) -}} | ||||||
| 
 | 
 | ||||||
| @ -47,7 +29,7 @@ | |||||||
|        "basePath" ($scratch.Get "bestPath") |        "basePath" ($scratch.Get "bestPath") | ||||||
|        "path" (.Get 1) |        "path" (.Get 1) | ||||||
|        "comment" ($scratch.Get "comment") |        "comment" ($scratch.Get "comment") | ||||||
|        "code" ($scratch.Get "joinedLines") |        "code" (delimit $lines "\n") | ||||||
|        "firstLine" (int (.Get 2)) |        "firstLine" (int (.Get 2)) | ||||||
|        "lastLine" (int (.Get 3)) |        "lastLine" (int (.Get 3)) | ||||||
|        "language" (.Get 0) |        "language" (.Get 0) | ||||||
|  | |||||||
| @ -1,12 +0,0 @@ | |||||||
| {{- $name := .Get 0 -}} |  | ||||||
| {{- $number := 1 -}} |  | ||||||
| {{- with .Page.Scratch.Get "internal-ref-counter" -}} |  | ||||||
| {{- $number = add . 1 }} |  | ||||||
| {{- end -}} |  | ||||||
| {{- .Page.Scratch.Set "internal-ref-counter" $number -}} |  | ||||||
| {{- .Page.Scratch.SetInMap "internal-ref" $name $number -}} |  | ||||||
| 
 |  | ||||||
| <span class="internal-ref" id="internal-ref-{{ $name }}"> |  | ||||||
| {{ .Inner }} |  | ||||||
| <span class="internal-ref-counter">{{ $number }}</span></span> |  | ||||||
| {{- /* chomp whitespace at the end */ -}} |  | ||||||
| @ -1,7 +0,0 @@ | |||||||
| {{- $name := .Get 0 -}} |  | ||||||
| {{- $number := index (.Page.Scratch.Get "internal-ref") $name -}} |  | ||||||
| 
 |  | ||||||
| <a href="#internal-ref-{{ $name }}"> |  | ||||||
| {{ .Inner }} |  | ||||||
| <span class="internal-ref-counter">{{ $number }}</span></a> |  | ||||||
| {{- /* chomp whitespace at the end */ -}} |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user