fune/browser/components/loop/standalone/grunttasks/replace.js
Rémy HUBSCHER fb4ec1d1e7 Bug 1044411 - Generate Loop ToS static content, r=abr,dmose; rs=ted for .hgignore changes
Bug 1044411 - Generate Loop ToS static content, priv-policy bits removed
2014-08-26 12:58:00 -05:00

37 lines
878 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
module.exports = function (grunt) {
'use strict';
grunt.config('replace', {
tos: {
src: [
'<%= project_vars.tos_md_src %>/*.md'
],
overwrite: true,
replacements: [{
// remove tags not handle by the markdown-to-HTML conversation
from: /{:\s.*?\s}/g,
to: ''
}, {
// remove unhandled comments
from: /^#\s.*?\n$/m,
to: ''
}, {
// fix "smart quotes"
from: /(“|”)/g,
to: "&quot;"
}, {
// fix "smart quotes"
from: //g,
to: "&#39;"
}, {
from: //g,
to: "&mdash;"
}
]
}
});
};