docs: fix man pages link if tok type is code
authorMithun Patel <mithunster@gmail.com>
Tue, 15 Mar 2016 15:11:26 +0000 (10:11 -0500)
committerMyles Borins <mborins@us.ibm.com>
Mon, 21 Mar 2016 20:07:07 +0000 (13:07 -0700)
Do not call the linkManPages if the tok type is code

Fixes: https://github.com/nodejs/node/issues/5686
PR-URL: https://github.com/nodejs/node/pull/5721
Reviewed-By: James M Snell <jasnell@gmail.com>
tools/doc/html.js

index 2565c97..8de9f49 100644 (file)
@@ -110,7 +110,7 @@ function render(lexed, filename, template, cb) {
 // for example, link man page references to the actual page
 function parseText(lexed) {
   lexed.forEach(function(tok) {
-    if (tok.text) {
+    if (tok.text && tok.type !== 'code') {
       tok.text = linkManPages(tok.text);
     }
   });