Skip to content

Commit

Permalink
doc: commenting functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Jul 15, 2017
1 parent 4ddee5e commit 6181403
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli/cms/templates/template.js
Expand Up @@ -377,6 +377,10 @@ export function getAbeSlugFromTemplates(templatesList) {
return slugs
}

/**
* if there is no abe tab='slug' in the template, add a default abe tag
* @param {[type]} templateText [description]
*/
export function setAbePrecontribDefaultValueIfDoesntExist(templateText) {
var matches = cmsData.regex.getTagAbeWithTab(templateText, 'slug')
if(matches == null || matches[0] == null) {
Expand All @@ -388,7 +392,7 @@ export function setAbePrecontribDefaultValueIfDoesntExist(templateText) {

/**
* Lists all templates, in each template:
* if no type='slug' replaces the template with default tag {{abe type='text' key='name'...}}
* if no tab='slug' replaces the template with default tag {{abe type='text' key='name'...}}
* then removes all abe tags (but the tab='slug' ones)
* then adds 'precontribTemplate' with the template name as an attribute to tab='slug' tags
* @param {Array} templatesList [description]
Expand Down

0 comments on commit 6181403

Please sign in to comment.