удалил все <br>, написал функцию которая подставляет <br> на место \n.
This commit is contained in:
parent
dd1eed15cf
commit
c7d7decfd8
11 changed files with 55 additions and 39 deletions
|
@ -88,13 +88,11 @@ var replace_type_def = function(_ln){
|
|||
}
|
||||
|
||||
var replace_enters_to_br = function(_str){
|
||||
// console.log(_str)
|
||||
var out = _str;
|
||||
while(out.match("\n")) out = out.replace("\n", "<br>");
|
||||
|
||||
// console.log(out);
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
linkto: linkto,
|
||||
|
|
0
templates/initi/static/styles/members.css
Normal file
0
templates/initi/static/styles/members.css
Normal file
|
@ -7,7 +7,7 @@
|
|||
var replaces_description = doc.description ? self.replace_enters_to_br(doc.description): "";
|
||||
|
||||
//if(doc.longname == "Models.Model"){
|
||||
console.log(replaces_description);
|
||||
// console.log(replaces_description);
|
||||
//}
|
||||
|
||||
?>
|
||||
|
@ -41,7 +41,8 @@
|
|||
<?js } ?>
|
||||
<?js } else if (doc.kind === 'module' && doc.modules) { ?>
|
||||
<?js doc.modules.forEach(function(module) { ?>
|
||||
<?js if (module.classdesc) { ?>
|
||||
<?js if (module.classdesc) { console.log("module.classdesc", module.classdesc)?>
|
||||
|
||||
<div class="class-description"><?js= module.classdesc ?></div>
|
||||
<?js } ?>
|
||||
<?js }) ?>
|
||||
|
@ -150,7 +151,7 @@
|
|||
<h3 class="subsection-title">Members</h3>
|
||||
|
||||
<?js members.forEach(function(p) { ?>
|
||||
<?js= self.partial('members.tmpl', p) ?>
|
||||
<?js= self.partial('members/main.tmpl', p) ?>
|
||||
<?js }); ?>
|
||||
<?js } ?>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/dd-menu.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/explorer.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/members.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
28
templates/initi/tmpl/members/main.tmpl
Normal file
28
templates/initi/tmpl/members/main.tmpl
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
|
||||
//console.log("MEMBERS", data);
|
||||
?>
|
||||
|
||||
<div class="parameter part bdotted">
|
||||
<?js if(data.description) { ?>
|
||||
<div class="description bdotted"><?js= self.replace_enters_to_br(data.description) ?></div>
|
||||
<?js } ?>
|
||||
|
||||
<div class="head bdotted part">
|
||||
|
||||
<span class="access">(<?js= data.access ?>)</span>
|
||||
|
||||
<span class="name"><?js= data.name ?></span>
|
||||
|
||||
<?js if(data.type) { ?>
|
||||
<span class="type">
|
||||
<span class="left-circle-bracket">(</span>
|
||||
<span class="name"><?js= self.linkto(data.type.names[0]) ?></span>
|
||||
<span class="right-circle-bracket">)</span>
|
||||
</span>
|
||||
<?js } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -19,7 +19,7 @@ var self = this;
|
|||
|
||||
<?js if (data.kind !== 'module' && data.description && !data.hideconstructor) { ?>
|
||||
<div class="description">
|
||||
<?js= data.description ?>
|
||||
<?js= this.replace_enters_to_br(data.description) ?>
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue