Skip to content

Commit

Permalink
Revert "Testing reveals that the whole lookup block can be removed, i…
Browse files Browse the repository at this point in the history
…nstead of just the rules like an overly-cautious reading of tonsky/FiraCode#1348 (comment) would suggest."

This reverts commit 1cacd16.

Fixes some ligatures like ellipses and circumflex-equals.
  • Loading branch information
achuie committed Oct 6, 2023
1 parent 1cacd16 commit b610625
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions nix-flakes/firacode/remove_specific_ligatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,20 @@ def find_calt(fp):
print(f" Scanning for {lig}...")
start = None
try:
starting = f"lookup {lig}"
start = calt_line.index(starting)
starting = f"lookup {lig}" + r" {\012"
start = calt_line.index(starting) + len(starting)
except ValueError as e:
print(f"Error: could not find start: {e}")
exit(1)

end = None
try:
ending = lig + r";\012\012"
end = calt_line.index(ending) + len(ending)
ending = r"\012} " + lig + r";\012\012"
end = calt_line.index(ending)
except ValueError as e:
try:
ending = lig + r';";'
# Only include the trailing ';' after the name of the rule.
end = calt_line.index(ending) + len(lig) + 1
ending = r"\012} " + lig + r';";'
end = calt_line.index(ending)
except ValueError as e:
print(f"Error: could not find end: {e}")
exit(1)
Expand Down

0 comments on commit b610625

Please sign in to comment.