blackfriday icon indicating copy to clipboard operation
blackfriday copied to clipboard

Complete french punctuation support

Open inwardmovement opened this issue 6 years ago • 0 comments

Following #378, it would be great to add non-breaking thin spaces also to other punctuation marks and currency symbols, according to Unicode : Space around punctuation and Non-breaking space#In France:

L'usage actuel en PAO française tend toutefois à généraliser l'usage de l'espace fine insécable dans tous les cas, aussi pour le deux-points et les guillemets.

Which means:

The current use in French Computer-Assisted Production however tends to generalize the use of thin non-breaking space in all cases, also for the colon and quotation marks.

For now I do it with Gulp:

function html() {
  return src('public/**/*.html')
    .pipe(beautify({
      indent_size: 2,
      preserve_newlines: false,
      extra_liners: []
    }))
    .pipe(replace('« ', '« '))
    .pipe(replace(' »', ' »'))
    .pipe(replace('« ', '« '))
    .pipe(replace(' »', ' »'))
    .pipe(replace(' :', ' :'))
    .pipe(replace(' ;', ' ;'))
    .pipe(replace(' !', ' !'))
    .pipe(replace(' ?', ' ?'))
    .pipe(replace(' %', ' %'))
    .pipe(replace(' €', ' €'))
    .pipe(replace(' <i ', '&#160;<i '))
    .pipe(replace('</i> ', '</i>&#160;'))
    .pipe(dest('public'))
}

&#160; is a non-breaking space. &laquo; is « &raquo; is »

inwardmovement avatar Feb 27 '18 15:02 inwardmovement