|
1195 | 1195 | location = 'multipage/' + hash; |
1196 | 1196 | } |
1197 | 1197 | } else if (e.key === 'u') { |
1198 | | - document.documentElement.classList.toggle('show-ao-annotations'); |
| 1198 | + document.documentElement.classList.toggle('show-uc-annotations'); |
| 1199 | + } else if (e.key === 'e') { |
| 1200 | + document.documentElement.classList.toggle('show-early-exits'); |
1199 | 1201 | } else if (e.key === '?') { |
1200 | 1202 | document.getElementById('shortcuts-help').classList.toggle('active'); |
1201 | 1203 | } |
|
1623 | 1625 | --link-foreground-color: #206ca7; |
1624 | 1626 | --link-hover-foreground-color: #239dee; |
1625 | 1627 |
|
1626 | | - --user-code-foreground-color: brown; |
| 1628 | + --annotation-foreground-color: brown; |
1627 | 1629 |
|
1628 | 1630 | --var-foreground-color: #218379; |
1629 | 1631 |
|
|
1707 | 1709 | --link-foreground-color: #439de2; |
1708 | 1710 | --link-hover-foreground-color: #80cafb; |
1709 | 1711 |
|
1710 | | - --user-code-foreground-color: brown; |
| 1712 | + --annotation-foreground-color: brown; |
1711 | 1713 |
|
1712 | 1714 | --var-foreground-color: #4fb6ab; |
1713 | 1715 |
|
|
1955 | 1957 | a.e-user-code::before, |
1956 | 1958 | span.e-user-code::before { |
1957 | 1959 | display: none; |
1958 | | - color: var(--user-code-foreground-color); |
| 1960 | + color: var(--annotation-foreground-color); |
1959 | 1961 | background-color: var(--background-color); |
1960 | | - border: 2pt solid var(--user-code-foreground-color); |
| 1962 | + border: 2pt solid var(--annotation-foreground-color); |
1961 | 1963 | padding: 0.3ex; |
1962 | 1964 | margin: 0 0.25em 0 0; |
1963 | 1965 | line-height: normal; |
|
1972 | 1974 |
|
1973 | 1975 | a.e-user-code:hover::before, |
1974 | 1976 | span.e-user-code:hover::before { |
1975 | | - background-color: var(--user-code-foreground-color); |
| 1977 | + background-color: var(--annotation-foreground-color); |
1976 | 1978 | color: var(--background-color); |
1977 | 1979 | } |
1978 | 1980 |
|
1979 | | -html.show-ao-annotations a.e-user-code::before, |
1980 | | -html.show-ao-annotations span.e-user-code::before { |
| 1981 | +html.show-uc-annotations a.e-user-code::before, |
| 1982 | +html.show-uc-annotations span.e-user-code::before { |
1981 | 1983 | display: inline-block; |
1982 | 1984 | } |
1983 | 1985 |
|
|
2080 | 2082 | font-weight: bold; |
2081 | 2083 | } |
2082 | 2084 |
|
| 2085 | +/* prefix algorithm-terminating steps with an indicator when dynamically enabled */ |
| 2086 | +emu-alg li.exit::before { |
| 2087 | + display: none; |
| 2088 | + border: 2pt solid var(--annotation-foreground-color); |
| 2089 | + font-size: small; |
| 2090 | + color: var(--annotation-foreground-color); |
| 2091 | + padding: 0 0.25em; |
| 2092 | + background-color: var(--background-color); |
| 2093 | + content: '⏎'; |
| 2094 | + margin-right: 0.25em; |
| 2095 | + line-height: 15px; |
| 2096 | + vertical-align: middle; |
| 2097 | +} |
| 2098 | +
|
| 2099 | +html.show-early-exits emu-alg li.exit:not(emu-alg ol.ac-body > li:last-child):not(emu-alg > ol > li:last-child)::before { |
| 2100 | + display: inline-block; |
| 2101 | +} |
| 2102 | +
|
| 2103 | +
|
2083 | 2104 | /* depth 1 */ |
2084 | 2105 | emu-alg ol, |
2085 | 2106 | /* depth 4 */ |
|
3985 | 4006 | <ul> |
3986 | 4007 | <li><span>Toggle shortcuts help</span><code>?</code></li> |
3987 | 4008 | <li><span>Toggle "can call user code" annotations</span><code>u</code></li> |
| 4009 | + <li><span>Toggle early exit annotations</span><code>e</code></li> |
3988 | 4010 |
|
3989 | 4011 | <li><span>Jump to search box</span><code>/</code></li> |
3990 | 4012 | <li><span>Toggle pinning of the current clause</span><code>p</code></li> |
|
0 commit comments