2014-04-16 22:40:27 +04:00
|
|
|
/* 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) {
|
|
|
|
grunt.config('replace', {
|
2015-06-15 04:31:40 +03:00
|
|
|
tos_pp: { //eslint-disable-line camelcase
|
2015-09-28 12:18:36 +03:00
|
|
|
overwrite: true,
|
|
|
|
replacements: [
|
|
|
|
{
|
|
|
|
from: /{:\s.*?\s}/g,
|
|
|
|
to: ''
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: /^#\s.*?\n$/m,
|
|
|
|
to: ''
|
2018-02-12 22:41:49 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
// sometimes provided legal docs have extra indent before links and headings
|
|
|
|
// such as ` [`, this creates a <code> block when parsed by remarkable
|
|
|
|
// to avoid that we remove the indent spaces
|
|
|
|
|
|
|
|
// ref: https://github.com/mozilla/legal-docs/blob/master/firefox_privacy_notice/en-US.md
|
|
|
|
from: /^ {4}/gm,
|
|
|
|
to: ''
|
2015-09-28 12:18:36 +03:00
|
|
|
}
|
|
|
|
],
|
2014-04-16 22:40:27 +04:00
|
|
|
src: [
|
|
|
|
'<%= yeoman.pp_md_src %>/*.md',
|
|
|
|
'<%= yeoman.tos_md_src %>/*.md'
|
2015-09-28 12:18:36 +03:00
|
|
|
]
|
2014-04-16 22:40:27 +04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|