Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete french punctuation support #439

Open
inwardmovement opened this issue Feb 27, 2018 · 0 comments
Open

Complete french punctuation support #439

inwardmovement opened this issue Feb 27, 2018 · 0 comments

Comments

@inwardmovement
Copy link

inwardmovement commented Feb 27, 2018

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 »

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant