Permalink
Browse files

remove unindented code in readme

  • Loading branch information...
yuguang committed Apr 27, 2012
1 parent 36663e3 commit b5d2a82eccc1ea81322f663f7fa8a80c9c66fc5f
Showing with 2 additions and 22 deletions.
  1. +2 −22 README.md
View
@@ -105,28 +105,8 @@ To add a language:
1. Modify the LANGUAGE and LANGUAGE_CATEGORY settings in *fiddle-configuration.js*.
2. Write a class in *fiddle-engine.coffee* that inherits *(Style/Program/Document)Editor*
-3. Create the compiler (aka worker) in _static/js/compilers/_ with the following lines:
-
- function sendResult(resultText) {
- if (typeof resultText === 'undefined' || resultText === null || !resultText.length) return;
- postMessage({
- 'type': 'result',
- 'resultText': resultText
- });
- }
- function sendError(errorText) {
- postMessage({
- 'type': 'error',
- 'errorText': errorText
- });
- }
- self.addEventListener('message', function(e) {
- try {
- // compile e.data for style and program editors and e.data.code for document editors
- } catch (err) {
- sendError(err.message);
- }
- }, false);
+3. Create the compiler (aka worker) in _static/js/compilers/_ with the [sendResult and sendError functions](https://github.com/yuguang/fiddlesalad/blob/master/static/js/compilers/coffeescript.js).
+The compiler reads input from e.data for style and program editors and e.data.code for document editors
###User Interface
####Home

0 comments on commit b5d2a82

Please sign in to comment.