I know zero javascript, and have one simple task:
- Find all text in the current html of the form [[.+?]]
- Extract the content of the brackets
- Replace all space characters with underscores
- Instead of the entire expression, output
<img src="foo.com/$1.jpg"/>, where $1 is the matched text (after spaces have been replaced). - (This should be done for all text inside [[]] in the html)
Can I bother you with a snippet that does this?