Hi Juan, you cannot see single linebreaks in tiddlerwiki5, only double ones. So to create two rows of a table
ret = "|a1|b1|\n|a2|b2|\n\n" all the best BJ On Friday, April 28, 2017 at 6:22:25 AM UTC+2, juan erasmo gomez wrote: > > Hi > > I'm writing a small macro to create a table. The idea behind the macro is > that I'll receive the number of columns as a parameter and work from there. > So far I've been able to create the first line of the table, but I haven't > found a way to add a line break and to add the second row of the table: > > /*\ > title: TrxMacro2 > type: application/javascript > module-type: macro > \*/ > (function(){ > > /*jslint node: true, browser: true */ > /*global $tw: false */ > "use strict"; > > exports.name = "trxmacro"; > > exports.params = [ > {name: "columns"} > ]; > > /* > Run the macro > */ > exports.run = function(columns) { > var ret+="|"; > var i; > for(i=0; i < columns; i++) { > ret+=" column "+(i+1) + " |"; > } > ret+="\n"; > return ret; > }; > > })(); > > > How can I add a linebreak to the return of my macro? > > Thanks, > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7166681b-509b-423a-ab6a-02f01ac53cee%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.