Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't escape en-dash, closes #50.
  • Loading branch information
kthoden committed May 25, 2020
1 parent 6fcff07 commit 2e4b6c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/data/aux/bibliography4ht.tex
Expand Up @@ -86,6 +86,7 @@
\defbibheading{none}[]{}
}
\newcommand\greekfont{}
\newcommand\chinesefont{}
\usepackage[autostyle]{csquotes}
\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen,dateabbrev=false,datecirca=true,dateuncertain=true,dateera=christian,urldate=long,uniquename=false$usepackagebiblatex]{biblatex}
\EOAbibtweaks
Expand Down
8 changes: 5 additions & 3 deletions src/utils/bib2html.py
Expand Up @@ -96,11 +96,13 @@ def get_bibl_info(
def latex_escape_non_ascii( input_str ):
output = ""

# set hex value here, orginal value was 7f
escape_threshold = "ff"
escape_lower_threshold = 255
# escape_upper_threshold = 8200
escape_exceptions = [8211,]

for c in input_str:
if ord(c) > int(escape_threshold, 16):
if ord(c) > escape_lower_threshold and ord(c) not in escape_exceptions :
# if escape_upper_threshold > ord(c) > escape_lower_threshold :
output += "\entity{{{}}}".format( ord(c) )
else:
output += c
Expand Down

0 comments on commit 2e4b6c0

Please sign in to comment.