You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following patch fixes the CoffeeScript issue, and it looks from this example http://joapp.com/docs/#joDoc like the Perl version of jodoc undents and would be fine with CoffeScript outputs, but I haven't tested it.
diff --git a/lib/jodoc-lib.js b/lib/jodoc-lib.js
index 41a7664..bfad125 100644
--- a/lib/jodoc-lib.js
+++ b/lib/jodoc-lib.js
@@ -10,14 +10,17 @@ var external_regex = /(\<a)\s+(href="(?:http[s]?|mailto|ftp)
// input: "code"
// output: "comments"
function docker (input) {
- var strip_code = /\057\*\*(?:.|[\r\n])*?\*\057/gm;
+ var strip_code = /^( *)\057\*\*(?:.|[\r\n])*?\*\057/gm;
var strip_stars = /(\*\057|\057\*\*)/g;
var strip_extra_whitespace = /([\r\n]+)\s/g;
+ var strip_indent;
var output = [];
var a;
while ((a = strip_code.exec(input)) !== null)
{
+ strip_indent = new RegExp("^" + a[1], "gm");
a = a[0];
+ a = a.replace(strip_indent, '');
a = a.replace(strip_stars,'');
a = a.replace(strip_extra_whitespace, '$1');
output.push(a);
Block comments generated by CoffeeScript are indented to align with the code rendering the Markdown unusable e.g.
Compiles to:
To fix this jodoc would need to unindent by the leading comment delimiter indent.
The text was updated successfully, but these errors were encountered: