Skip to content

Complete french punctuation support #439

Open

Description

@inwardmovement

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 »

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions