This repository was archived by the owner on May 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ const Handlebars = require ( 'handlebars' ) ;
2
+
3
+ Handlebars . registerHelper ( 'replaceNewLinesWithBR' , block => block . replace ( / [ \r \n ] + / g, '<br>' ) ) ;
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ const path = require('path');
3
3
4
4
const Handlebars = require ( 'handlebars' ) ;
5
5
6
+ require ( './helpers' ) ;
7
+
6
8
/**
7
9
* Markdown template plugin for doxdox.
8
10
*
Original file line number Diff line number Diff line change 27
27
| Name | Type | Description | |
28
28
| ---- | ---- | ----------- | -------- |
29
29
{{ #each tags.param }}
30
- | {{ name }} | {{ #each types }} `{{ . }} ` {{ /each }} | {{{ description }}} | {{ #if isOptional }} *Optional*{{ else }} {{ /if }} |
30
+ | {{ name }} | {{ #each types }} `{{{ . }}} ` {{ /each }} | {{{ replaceNewLinesWithBR description }}} | {{ #if isOptional }} *Optional*{{ else }} {{ /if }} |
31
31
{{ /each }}
32
32
33
33
{{ /if }}
39
39
| Name | Type | Description | |
40
40
| ---- | ---- | ----------- | -------- |
41
41
{{ #each tags.param }}
42
- | {{ name }} | {{ #each types }} `{{ . }} ` {{ /each }} | {{{ description }}} | {{ #if isOptional }} *Optional*{{ else }} {{ /if }} |
42
+ | {{ name }} | {{ #each types }} `{{{ . }}} ` {{ /each }} | {{{ replaceNewLinesWithBR description }}} | {{ #if isOptional }} *Optional*{{ else }} {{ /if }} |
43
43
{{ /each }}
44
44
45
45
{{ /if }}
You can’t perform that action at this time.
0 commit comments