diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..f8bdd60f49 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +*.txt text +*.js text +*.html text +*.md text +*.json text +*.yml text +*.css text +*.svg text diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..afc18373cc --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# How to contribute + +- [Getting help](#getting-help-) +- [Submitting bug reports](#submitting-bug-reports-) +- [Contributing code](#contributing-code-) + +## Getting help [^](#how-to-contribute) + +Community discussion, questions, and informal bug reporting is done on the +[CodeMirror Google group](http://groups.google.com/group/codemirror). + +## Submitting bug reports [^](#how-to-contribute) + +The preferred way to report bugs is to use the +[GitHub issue tracker](http://github.com/marijnh/CodeMirror/issues). Before +reporting a bug, read these pointers. + +**Note:** The issue tracker is for *bugs*, not requests for help. Questions +should be asked on the +[CodeMirror Google group](http://groups.google.com/group/codemirror) instead. + +### Reporting bugs effectively + +- CodeMirror is maintained by volunteers. They don't owe you anything, so be + polite. Reports with an indignant or belligerent tone tend to be moved to the + bottom of the pile. + +- Include information about **the browser in which the problem occurred**. Even + if you tested several browsers, and the problem occurred in all of them, + mention this fact in the bug report. Also include browser version numbers and + the operating system that you're on. + +- Mention which release of CodeMirror you're using. Preferably, try also with + the current development snapshot, to ensure the problem has not already been + fixed. + +- Mention very precisely what went wrong. "X is broken" is not a good bug + report. What did you expect to happen? What happened instead? Describe the + exact steps a maintainer has to take to make the problem occur. We can not + fix something that we can not observe. + +- If the problem can not be reproduced in any of the demos included in the + CodeMirror distribution, please provide an HTML document that demonstrates + the problem. The best way to do this is to go to + [jsbin.com](http://jsbin.com/ihunin/edit), enter it there, press save, and + include the resulting link in your bug report. + +## Contributing code [^](#how-to-contribute) + +- Make sure you have a [GitHub Account](https://github.com/signup/free) +- Fork [CodeMirror](https://github.com/marijnh/CodeMirror/) + ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) +- Make your changes +- If your changes are easy to test or likely to regress, add tests. + Tests for the core go into `test/test.js`, some modes have their own + test suite under `mode/XXX/test.js`. Feel free to add new test + suites to modes that don't have one yet (be sure to link the new + tests into `test/index.html`). +- Make sure all tests pass. Visit `test/index.html` in your browser to + run them. +- Submit a pull request +([how to create a pull request](https://help.github.com/articles/fork-a-repo)) + +### Coding standards + +- 2 spaces per indentation level, no tabs. +- Include semicolons after statements. +- Note that the linter (`test/lint/lint.js`) which is run after each + commit complains about unused variables and functions. Prefix their + names with an underscore to muffle it. diff --git a/README.md b/README.md index 8ed9871a46..3e87272fd8 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,6 @@ CodeMirror is a JavaScript component that provides a code editor in the browser. When a mode is available for the language you are coding in, it will color your code, and optionally help with indentation. -The project page is http://codemirror.net -The manual is at http://codemirror.net/doc/manual.html +The project page is http://codemirror.net +The manual is at http://codemirror.net/doc/manual.html +The contributing guidelines are in the CONTRIBUTING.md file diff --git a/demo/closetag.html b/demo/closetag.html index c405a3c322..a5089a9615 100644 --- a/demo/closetag.html +++ b/demo/closetag.html @@ -1,66 +1,66 @@ - - - - - CodeMirror: Close-Tag Demo - - - - - - - - - - - - -

Close-Tag Demo

-