fannairu / pagedown

Automatically exported from code.google.com/p/pagedown
Other
0 stars 0 forks source link

Customizing link markdown like Github does with usernames #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hi, I'd like to have usernames linked as Github does with their markdown (i.e., 
the usernames indicated with "@"). The following code should do it, but not [at 
line 211 in the 
converter.js](https://github.com/ujifgc/pagedown/blob/master/Markdown.Converter.
js#L211), which is where I've tested it.

            var text="hello @ujifgc thanks for making this pagedown plugin";
            var find = '@(.*?) ';
            var re = new RegExp(find, 'g');
            text = text.replace(re, '[@$1](http://your-site.com/$1) ');

Any clue how to make this work?

Original issue reported on code.google.com by peterson...@gmail.com on 8 Feb 2014 at 9:12

GoogleCodeExporter commented 9 years ago
Please only use the issue tracker for issue reports. This seems way more suited 
for Stack Overflow.

Original comment by b...@stackoverflow.com on 11 Apr 2014 at 8:01