cu-mkp / 2017-workshop-edition

Other
0 stars 3 forks source link

hyphens converted to em-dash #24

Open tcatapano opened 6 years ago

tcatapano commented 6 years ago

per Tillmann:

I just spotted a bug looking at the translation of 166r in the minimal edition: two em-dashes which should be hyphens (“long-buried” and “ready-made”). I thought I’d mention it in case it’s a more widespread issue.

tcatapano commented 6 years ago

E.g., see 166r "long—buried" etc... Seems to be a result of conversion from xml to md as hyphen is used in GDrive (https://docs.google.com/document/d/1mM1YRU3eSGWJXapbYtibWg00NsG1HnY2ZtsFgk0S0bs) and is also present in derived XML (https://github.com/cu-mkp/ms-xml/blob/master/tl/tl_p166r_preTEI.xml). Also renders properly in DCE (http://edition.makingandknowing.org/#/?m=l&sr=0.50&l=f337,tc,i,0&r=f337,tl,t,0).

tcatapano commented 6 years ago

This is likely the culprit: https://github.com/cu-mkp/ms-xml/blob/master/xslt/entry-to-md.xsl#L269

    <xsl:template match="text()">
        <xsl:value-of select="replace(replace(replace(., '-', '—'), '\s+', ' '), '\+', '\\+')"/>
    </xsl:template>