Skip to content

Commit

Permalink
Chg default comment prefix & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wiggin77 committed Jul 9, 2018
1 parent 686e76a commit 98bfdca
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Codedox change log

## 1.2.8

* Change default comment prefix and formatting to better display in vshaxe and Dox.

## 1.2.7

* Fixed broken indentation with a `commentprefix` that only contains whitespace; see [issue 26](https://github.com/vshaxe/codedox/issues/26)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ If you want to create a custom license/copyright template or want to change how
"autoInsert": true, // enables insertion of function comments trigged by keystrokes
"autoInsertHeader": true, // enables insertion of file header triggered by keystrokes
"autoPrefixOnEnter": true, // enables 'on enter' rules
"paramFormat": "@param ${name} - ", // supports ${name} and ${type}, plus built-in params
"paramFormat": "@param ${name} ", // supports ${name} and ${type}, plus built-in params
"returnFormat": "@return ${type}", // supports ${type}, plus built-in params
"allowOptionalArgs": false, // false strips the '?' prefix from optional function args
"alwaysMultiline": true, // if false non-functions (types) are single line
"commentprefix": "* ",
"commentprefix": "* ",
"commentbegin": "/**",
"commentend": "*/",
"commentdescription": "[Description]",
"headerprefix": " *",
"headerprefix": "*",
"headerbegin": "/*",
"headerend": " */",
"headerend": "*/",
"fileheader": {
"params": {
"*": {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "codedox",
"displayname": "Codedox for Haxe",
"description": "JSDoc-style comments for Haxe. @param and @return tags, plus customizable file header license and copyright comments.",
"version": "1.2.7",
"version": "1.2.8",
"publisher": "wiggin77",
"license": "(MIT) View license in LICENSE.md",
"engines": {
Expand Down Expand Up @@ -86,7 +86,7 @@
"paramFormat": {
"description": "Format of the @param tag, using ${name} and ${type} fields",
"type": "string",
"default": "@param ${name} - "
"default": "@param ${name} "
},
"returnFormat": {
"description": "Format of the @return tag, using ${type} field",
Expand All @@ -101,7 +101,7 @@
"commentprefix": {
"description": "Per-line comment prefix",
"type": "string",
"default": " * "
"default": "* "
},
"commentbegin": {
"description": "Start of function comment",
Expand All @@ -111,7 +111,7 @@
"commentend": {
"description": "End of function comment",
"type": "string",
"default": " */"
"default": "*/"
},
"commentdescription": {
"description": "Initial text added to comment description",
Expand All @@ -126,7 +126,7 @@
"headerprefix": {
"description": "Per-line header prefix",
"type": "string",
"default": " *"
"default": "*"
},
"headerbegin": {
"description": "Start of file header comment",
Expand Down
10 changes: 5 additions & 5 deletions sample.codedox.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"autoInsert": true,
"autoInsertHeader": true,
"autoPrefixOnEnter": true,
"paramFormat": "@param ${name} - ",
"paramFormat": "@param ${name} ",
"returnFormat": "@return ${type}",
"allowOptionalArgs": false,
"commentprefix": " * ",
"commentprefix": "* ",
"commentbegin": "/**",
"commentend": " */",
"commentend": "*/",
"commentdescription": "[Description]",
"alwaysMultiline": true,
"headerprefix": " *",
"headerprefix": "*",
"headerbegin": "/*",
"headerend": " */",
"headerend": "*/",
"fileheader": {
"params": {
"*": {
Expand Down
8 changes: 4 additions & 4 deletions src/wiggin/codedox/Settings.hx
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ class Settings
this.autoPrefixOnEnter = getProp("autoPrefixOnEnter", true, ctx);
this.autoInsert = getProp("autoInsert", true, ctx);
this.autoInsertHeader = getProp("autoInsertHeader", true, ctx);
this.strParamFormat = getProp("paramFormat", "@param ${name} - ", ctx);
this.strParamFormat = getProp("paramFormat", "@param ${name} ", ctx);
this.strReturnFormat = getProp("returnFormat", "@return ${type}", ctx);
this.strCommentBegin = strCommentBegin;
this.strCommentEnd = getProp("commentend", " */", ctx);
this.strCommentPrefix = getProp("commentprefix", " * ", ctx);
this.strCommentEnd = getProp("commentend", "*/", ctx);
this.strCommentPrefix = getProp("commentprefix", "* ", ctx);
this.strCommentDescription = getProp("commentdescription", "[Description]", ctx);
this.strCommentToken = "[]";
this.strCommentTrigger = StringUtil.right(strCommentBegin, 1);
Expand All @@ -120,7 +120,7 @@ class Settings
this.strAutoClosingCloseAlt = (strAutoCloseAlt != null) ? strAutoCloseAlt : "";
this.strHeaderBegin = getProp("headerbegin", "/*", ctx);
this.strHeaderEnd = getProp("headerend", "*/", ctx);
this.strHeaderPrefix = getProp("headerprefix", " *", ctx);
this.strHeaderPrefix = getProp("headerprefix", "*", ctx);
this.strHeaderTrigger = StringUtil.right(strHeaderBegin, 1);
this.allowOptionalArgs = getProp("allowOptionalArgs", false, ctx);
}
Expand Down
4 changes: 2 additions & 2 deletions test/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
// Codedox settings
"codedox": {
"paramFormat": "${fname} - @param {${type}} ${name} - ",
//"paramFormat": "${fname} - @param {${type}} ${name} - ",
//"returnFormat": "@return ${type}",
//"alwaysMultiline": false,

Expand All @@ -25,7 +25,7 @@
//"headerbegin": "/**",
//"headerprefix": " ",
//"headerend": "**/",
"commentdescription": "${fname} - [Description]\n",
//"commentdescription": "${fname} - [Description]\n",

"fileheader": {
"params": {
Expand Down

0 comments on commit 98bfdca

Please sign in to comment.