pombreda / txt2tags

Automatically exported from code.google.com/p/txt2tags
GNU General Public License v2.0
0 stars 0 forks source link

Show source comments in output file #112

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There's no comments output, no I don't joke !

A quick exemple to understand, in sample.t2t :
% a secret comment!
should become, in html.sample :
<!-- a secret comment! -->

Original issue reported on code.google.com by fgalla...@gmail.com on 6 Jan 2011 at 1:46

GoogleCodeExporter commented 9 years ago
I think we may add an other comment tag, which could insert comments like this 
into the target, but if a "secret comment" with % is exported into the target 
by default, it won't be secret anymore because it's possible to see the source 
code of a html document!

It's also easy to use a preproc to change the default behavior, such as:

%!preproc(html): '^%(.*?)$' ''<!-- \1 -->''

Original comment by eforg...@gmail.com on 6 Jan 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Comments in txt2tags source code were always meant to be viewed in the source 
only. Sometimes it's a message, sometimes it's a huge block of deactivated 
text. But it's not meant to be in the converted document. Users rely on this 
behavior since version 1.0.

Eric's solution is fine, but need to be improved because it can mess with 
macros like %%date at the beginning of the line.

Yes, creating a new mark for this kind of comment in output is one alternative. 
Another is a setting that user can put in a file by file basis (or the global 
config), like %!showcomments or something.

Original comment by aureliojargas@gmail.com on 21 Dec 2011 at 10:18