Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the Fd macro #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add support for the Fd macro
dspinellis committed Mar 19, 2018
commit 7597db271d35ea5fafe25088fb952191cc6d1f34
17 changes: 17 additions & 0 deletions src/macros/doc.js
Original file line number Diff line number Diff line change
@@ -1492,6 +1492,23 @@ macros.doc = {
return macros.doc.Fn.call(this, callParams);
},

/**
* Preprocessor directive, in particular for listing it in the SYNOPSIS.
*
* @argument {string} args.name preprocessor directive
*
* @returns {string}
*
* @since 0.0.1
*
*/
Fd: function (args) {

args = this.parseArguments(args);

return this.generateTag('strong', args.join(' ')) + '<br>';
},

/**
* Prints the provided text in italics, if its called inside of the
* SYNOPSIS section it also adds a line break
8 changes: 8 additions & 0 deletions test/macros/doc/Fd.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
@it it displays the specified arguments on a separate line

.Fd #ifdef FS_DEBUG
-->

<strong>#ifdef FS_DEBUG</strong><br>