Skip to content
This repository
Browse code

Merge pull request #81 from eethann/master

Remove extra backticks in some fenced code blocks.
  • Loading branch information...
commit 4b8135dc0197c2b5d30d14b54340914a3707cab2 2 parents e566874 + df48ac1
Addy Osmani authored

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 README.md
12 README.md
Source Rendered
@@ -458,7 +458,7 @@ var PhotoView = Backbone.View.extend({
458 458 }
459 459
460 460 });
461   -````
  461 +```
462 462
463 463
464 464 Another (quite different) opinion is that Backbone more closely resembles [Smalltalk-80 MVC](http://martinfowler.com/eaaDev/uiArchs.html#ModelViewController), which we went through earlier.
@@ -755,7 +755,7 @@ var PhotoSearch = Backbone.View.extend({
755 755 There are two ways to attach a DOM element to a view: the element already exists in the page or a new element is created for the view and added manually by the developer.
756 756 If the element already exists in the page, you can set `el` as either a CSS selector that matches the element or a simple reference to the DOM element.
757 757
758   -````javascript
  758 +```javascript
759 759 el: '#footer',
760 760 // OR
761 761 el: document.getElementById( 'footer' )
@@ -763,7 +763,7 @@ el: document.getElementById( 'footer' )
763 763
764 764 If you want to create a new element for you view, set any combination of the following view's properties: `tagName`, `id` and `className`. A new element will be created for you by the framework and a reference to it will be available at the `el` property.
765 765
766   -````javascript
  766 +```javascript
767 767 tagName: 'p', // required, but defaults to 'div' if not set
768 768 className: 'container', // optional, you can assign multiple classes to this property like so 'container homepage'
769 769 id: 'header', // optional
@@ -771,7 +771,7 @@ id: 'header', // optional
771 771
772 772 The above code creates the ```DOMElement``` below but doesn't append it to the DOM.
773 773
774   -````html
  774 +```html
775 775 <p id="header" class="container"></p>
776 776 ```
777 777
@@ -3130,7 +3130,7 @@ it('Can contain custom validation rules, and will trigger an error event on fail
3130 3130 expect(errorArgs[1]).toBe('Todo.done must be a boolean value.');
3131 3131 });
3132 3132
3133   -````
  3133 +```
3134 3134
3135 3135 The code to make the above failing test support validation is relatively simple. In our model, we override the validate() method (as recommended in the Backbone docs), checking to make sure a model both has a 'done' property and is a valid boolean before allowing it to pass.
3136 3136
@@ -3360,7 +3360,7 @@ If instead of testing against the ```tagName``` you would prefer to use a classN
3360 3360 it('Should have a class of "todos"'), function(){
3361 3361 expect($(this.view.el)).toHaveClass('todos');
3362 3362 });
3363   -````
  3363 +```
3364 3364
3365 3365 The ```toHaveClass()``` matcher operates on jQuery objects and if the plugin hadn't been used, an exception would have been incurred (it is of course also possible to test for the className by accessing el.className if not opting to use jasmine-jquery).
3366 3366

0 comments on commit 4b8135d

Please sign in to comment.
Something went wrong with that request. Please try again.