Showing preview only (3,883K chars total). Download the full file or copy to clipboard to get everything.
Repository: codemirror/codemirror5
Branch: master
Commit: 24ee74bbf433
Files: 581
Total size: 3.6 MB
Directory structure:
gitextract_k6pzpmws/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .npmignore
├── AUTHORS
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── addon/
│ ├── comment/
│ │ ├── comment.js
│ │ └── continuecomment.js
│ ├── dialog/
│ │ ├── dialog.css
│ │ └── dialog.js
│ ├── display/
│ │ ├── autorefresh.js
│ │ ├── fullscreen.css
│ │ ├── fullscreen.js
│ │ ├── panel.js
│ │ ├── placeholder.js
│ │ └── rulers.js
│ ├── edit/
│ │ ├── closebrackets.js
│ │ ├── closetag.js
│ │ ├── continuelist.js
│ │ ├── matchbrackets.js
│ │ ├── matchtags.js
│ │ └── trailingspace.js
│ ├── fold/
│ │ ├── brace-fold.js
│ │ ├── comment-fold.js
│ │ ├── foldcode.js
│ │ ├── foldgutter.css
│ │ ├── foldgutter.js
│ │ ├── indent-fold.js
│ │ ├── markdown-fold.js
│ │ └── xml-fold.js
│ ├── hint/
│ │ ├── anyword-hint.js
│ │ ├── css-hint.js
│ │ ├── html-hint.js
│ │ ├── javascript-hint.js
│ │ ├── show-hint.css
│ │ ├── show-hint.js
│ │ ├── sql-hint.js
│ │ └── xml-hint.js
│ ├── lint/
│ │ ├── coffeescript-lint.js
│ │ ├── css-lint.js
│ │ ├── html-lint.js
│ │ ├── javascript-lint.js
│ │ ├── json-lint.js
│ │ ├── lint.css
│ │ ├── lint.js
│ │ └── yaml-lint.js
│ ├── merge/
│ │ ├── merge.css
│ │ └── merge.js
│ ├── mode/
│ │ ├── loadmode.js
│ │ ├── multiplex.js
│ │ ├── multiplex_test.js
│ │ ├── overlay.js
│ │ └── simple.js
│ ├── runmode/
│ │ ├── colorize.js
│ │ └── runmode.js
│ ├── scroll/
│ │ ├── annotatescrollbar.js
│ │ ├── scrollpastend.js
│ │ ├── simplescrollbars.css
│ │ └── simplescrollbars.js
│ ├── search/
│ │ ├── jump-to-line.js
│ │ ├── match-highlighter.js
│ │ ├── matchesonscrollbar.css
│ │ ├── matchesonscrollbar.js
│ │ ├── search.js
│ │ └── searchcursor.js
│ ├── selection/
│ │ ├── active-line.js
│ │ ├── mark-selection.js
│ │ └── selection-pointer.js
│ ├── tern/
│ │ ├── tern.css
│ │ ├── tern.js
│ │ └── worker.js
│ └── wrap/
│ └── hardwrap.js
├── bin/
│ ├── authors.sh
│ ├── lint
│ ├── release
│ ├── source-highlight
│ └── upload-release.js
├── demo/
│ ├── activeline.html
│ ├── anywordhint.html
│ ├── bidi.html
│ ├── btree.html
│ ├── buffers.html
│ ├── changemode.html
│ ├── closebrackets.html
│ ├── closetag.html
│ ├── complete.html
│ ├── emacs.html
│ ├── folding.html
│ ├── fullscreen.html
│ ├── hardwrap.html
│ ├── html5complete.html
│ ├── indentwrap.html
│ ├── lint.html
│ ├── loadmode.html
│ ├── marker.html
│ ├── markselection.html
│ ├── matchhighlighter.html
│ ├── matchtags.html
│ ├── merge.html
│ ├── multiplex.html
│ ├── mustache.html
│ ├── panel.html
│ ├── placeholder.html
│ ├── preview.html
│ ├── requirejs.html
│ ├── resize.html
│ ├── rulers.html
│ ├── runmode-standalone.html
│ ├── runmode.html
│ ├── search.html
│ ├── simplemode.html
│ ├── simplescrollbars.html
│ ├── spanaffectswrapping_shim.html
│ ├── sublime.html
│ ├── tern.html
│ ├── theme.html
│ ├── trailingspace.html
│ ├── variableheight.html
│ ├── vim.html
│ ├── visibletabs.html
│ ├── widget.html
│ └── xmlcomplete.html
├── doc/
│ ├── activebookmark.js
│ ├── docs.css
│ ├── internals.html
│ ├── manual.html
│ ├── releases.html
│ ├── reporting.html
│ ├── upgrade_v2.2.html
│ ├── upgrade_v3.html
│ └── upgrade_v4.html
├── index.html
├── keymap/
│ ├── emacs.js
│ └── sublime.js
├── lib/
│ └── codemirror.css
├── mode/
│ ├── apl/
│ │ ├── apl.js
│ │ └── index.html
│ ├── asciiarmor/
│ │ ├── asciiarmor.js
│ │ └── index.html
│ ├── asn.1/
│ │ ├── asn.1.js
│ │ └── index.html
│ ├── asterisk/
│ │ ├── asterisk.js
│ │ └── index.html
│ ├── brainfuck/
│ │ ├── brainfuck.js
│ │ └── index.html
│ ├── clike/
│ │ ├── clike.js
│ │ ├── index.html
│ │ ├── scala.html
│ │ └── test.js
│ ├── clojure/
│ │ ├── clojure.js
│ │ ├── index.html
│ │ └── test.js
│ ├── cmake/
│ │ ├── cmake.js
│ │ └── index.html
│ ├── cobol/
│ │ ├── cobol.js
│ │ └── index.html
│ ├── coffeescript/
│ │ ├── coffeescript.js
│ │ └── index.html
│ ├── commonlisp/
│ │ ├── commonlisp.js
│ │ └── index.html
│ ├── crystal/
│ │ ├── crystal.js
│ │ └── index.html
│ ├── css/
│ │ ├── css.js
│ │ ├── gss.html
│ │ ├── gss_test.js
│ │ ├── index.html
│ │ ├── less.html
│ │ ├── less_test.js
│ │ ├── scss.html
│ │ ├── scss_test.js
│ │ └── test.js
│ ├── cypher/
│ │ ├── cypher.js
│ │ ├── index.html
│ │ └── test.js
│ ├── d/
│ │ ├── d.js
│ │ ├── index.html
│ │ └── test.js
│ ├── dart/
│ │ ├── dart.js
│ │ └── index.html
│ ├── diff/
│ │ ├── diff.js
│ │ └── index.html
│ ├── django/
│ │ ├── django.js
│ │ └── index.html
│ ├── dockerfile/
│ │ ├── dockerfile.js
│ │ ├── index.html
│ │ └── test.js
│ ├── dtd/
│ │ ├── dtd.js
│ │ └── index.html
│ ├── dylan/
│ │ ├── dylan.js
│ │ ├── index.html
│ │ └── test.js
│ ├── ebnf/
│ │ ├── ebnf.js
│ │ └── index.html
│ ├── ecl/
│ │ ├── ecl.js
│ │ └── index.html
│ ├── eiffel/
│ │ ├── eiffel.js
│ │ └── index.html
│ ├── elm/
│ │ ├── elm.js
│ │ └── index.html
│ ├── erlang/
│ │ ├── erlang.js
│ │ └── index.html
│ ├── factor/
│ │ ├── factor.js
│ │ └── index.html
│ ├── fcl/
│ │ ├── fcl.js
│ │ └── index.html
│ ├── forth/
│ │ ├── forth.js
│ │ └── index.html
│ ├── fortran/
│ │ ├── fortran.js
│ │ └── index.html
│ ├── gas/
│ │ ├── gas.js
│ │ └── index.html
│ ├── gfm/
│ │ ├── gfm.js
│ │ ├── index.html
│ │ └── test.js
│ ├── gherkin/
│ │ ├── gherkin.js
│ │ └── index.html
│ ├── go/
│ │ ├── go.js
│ │ └── index.html
│ ├── groovy/
│ │ ├── groovy.js
│ │ └── index.html
│ ├── haml/
│ │ ├── haml.js
│ │ ├── index.html
│ │ └── test.js
│ ├── handlebars/
│ │ ├── handlebars.js
│ │ └── index.html
│ ├── haskell/
│ │ ├── haskell.js
│ │ └── index.html
│ ├── haskell-literate/
│ │ ├── haskell-literate.js
│ │ └── index.html
│ ├── haxe/
│ │ ├── haxe.js
│ │ └── index.html
│ ├── htmlembedded/
│ │ ├── htmlembedded.js
│ │ └── index.html
│ ├── htmlmixed/
│ │ ├── htmlmixed.js
│ │ └── index.html
│ ├── http/
│ │ ├── http.js
│ │ └── index.html
│ ├── idl/
│ │ ├── idl.js
│ │ └── index.html
│ ├── index.html
│ ├── javascript/
│ │ ├── index.html
│ │ ├── javascript.js
│ │ ├── json-ld.html
│ │ ├── test.js
│ │ └── typescript.html
│ ├── jinja2/
│ │ ├── index.html
│ │ └── jinja2.js
│ ├── jsx/
│ │ ├── index.html
│ │ ├── jsx.js
│ │ └── test.js
│ ├── julia/
│ │ ├── index.html
│ │ └── julia.js
│ ├── livescript/
│ │ ├── index.html
│ │ └── livescript.js
│ ├── lua/
│ │ ├── index.html
│ │ └── lua.js
│ ├── markdown/
│ │ ├── index.html
│ │ ├── markdown.js
│ │ └── test.js
│ ├── mathematica/
│ │ ├── index.html
│ │ └── mathematica.js
│ ├── mbox/
│ │ ├── index.html
│ │ └── mbox.js
│ ├── meta.js
│ ├── mirc/
│ │ ├── index.html
│ │ └── mirc.js
│ ├── mllike/
│ │ ├── index.html
│ │ └── mllike.js
│ ├── modelica/
│ │ ├── index.html
│ │ └── modelica.js
│ ├── mscgen/
│ │ ├── index.html
│ │ ├── mscgen.js
│ │ ├── mscgen_test.js
│ │ ├── msgenny_test.js
│ │ └── xu_test.js
│ ├── mumps/
│ │ ├── index.html
│ │ └── mumps.js
│ ├── nginx/
│ │ ├── index.html
│ │ └── nginx.js
│ ├── nsis/
│ │ ├── index.html
│ │ └── nsis.js
│ ├── ntriples/
│ │ ├── index.html
│ │ └── ntriples.js
│ ├── octave/
│ │ ├── index.html
│ │ └── octave.js
│ ├── oz/
│ │ ├── index.html
│ │ └── oz.js
│ ├── pascal/
│ │ ├── index.html
│ │ └── pascal.js
│ ├── pegjs/
│ │ ├── index.html
│ │ └── pegjs.js
│ ├── perl/
│ │ ├── index.html
│ │ └── perl.js
│ ├── php/
│ │ ├── index.html
│ │ ├── php.js
│ │ └── test.js
│ ├── pig/
│ │ ├── index.html
│ │ └── pig.js
│ ├── powershell/
│ │ ├── index.html
│ │ ├── powershell.js
│ │ └── test.js
│ ├── properties/
│ │ ├── index.html
│ │ └── properties.js
│ ├── protobuf/
│ │ ├── index.html
│ │ └── protobuf.js
│ ├── pug/
│ │ ├── index.html
│ │ └── pug.js
│ ├── puppet/
│ │ ├── index.html
│ │ └── puppet.js
│ ├── python/
│ │ ├── index.html
│ │ ├── python.js
│ │ └── test.js
│ ├── q/
│ │ ├── index.html
│ │ └── q.js
│ ├── r/
│ │ ├── index.html
│ │ └── r.js
│ ├── rpm/
│ │ ├── changes/
│ │ │ └── index.html
│ │ ├── index.html
│ │ └── rpm.js
│ ├── rst/
│ │ ├── index.html
│ │ └── rst.js
│ ├── ruby/
│ │ ├── index.html
│ │ ├── ruby.js
│ │ └── test.js
│ ├── rust/
│ │ ├── index.html
│ │ ├── rust.js
│ │ └── test.js
│ ├── sas/
│ │ ├── index.html
│ │ └── sas.js
│ ├── sass/
│ │ ├── index.html
│ │ ├── sass.js
│ │ └── test.js
│ ├── scheme/
│ │ ├── index.html
│ │ └── scheme.js
│ ├── shell/
│ │ ├── index.html
│ │ ├── shell.js
│ │ └── test.js
│ ├── sieve/
│ │ ├── index.html
│ │ └── sieve.js
│ ├── slim/
│ │ ├── index.html
│ │ ├── slim.js
│ │ └── test.js
│ ├── smalltalk/
│ │ ├── index.html
│ │ └── smalltalk.js
│ ├── smarty/
│ │ ├── index.html
│ │ └── smarty.js
│ ├── solr/
│ │ ├── index.html
│ │ └── solr.js
│ ├── soy/
│ │ ├── index.html
│ │ ├── soy.js
│ │ └── test.js
│ ├── sparql/
│ │ ├── index.html
│ │ └── sparql.js
│ ├── spreadsheet/
│ │ ├── index.html
│ │ └── spreadsheet.js
│ ├── sql/
│ │ ├── index.html
│ │ └── sql.js
│ ├── stex/
│ │ ├── index.html
│ │ ├── stex.js
│ │ └── test.js
│ ├── stylus/
│ │ ├── index.html
│ │ └── stylus.js
│ ├── swift/
│ │ ├── index.html
│ │ ├── swift.js
│ │ └── test.js
│ ├── tcl/
│ │ ├── index.html
│ │ └── tcl.js
│ ├── textile/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── textile.js
│ ├── tiddlywiki/
│ │ ├── index.html
│ │ ├── tiddlywiki.css
│ │ └── tiddlywiki.js
│ ├── tiki/
│ │ ├── index.html
│ │ ├── tiki.css
│ │ └── tiki.js
│ ├── toml/
│ │ ├── index.html
│ │ └── toml.js
│ ├── tornado/
│ │ ├── index.html
│ │ └── tornado.js
│ ├── troff/
│ │ ├── index.html
│ │ └── troff.js
│ ├── ttcn/
│ │ ├── index.html
│ │ └── ttcn.js
│ ├── ttcn-cfg/
│ │ ├── index.html
│ │ └── ttcn-cfg.js
│ ├── turtle/
│ │ ├── index.html
│ │ └── turtle.js
│ ├── twig/
│ │ ├── index.html
│ │ └── twig.js
│ ├── vb/
│ │ ├── index.html
│ │ └── vb.js
│ ├── vbscript/
│ │ ├── index.html
│ │ └── vbscript.js
│ ├── velocity/
│ │ ├── index.html
│ │ └── velocity.js
│ ├── verilog/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── verilog.js
│ ├── vhdl/
│ │ ├── index.html
│ │ └── vhdl.js
│ ├── vue/
│ │ ├── index.html
│ │ └── vue.js
│ ├── wast/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── wast.js
│ ├── webidl/
│ │ ├── index.html
│ │ └── webidl.js
│ ├── xml/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── xml.js
│ ├── xquery/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── xquery.js
│ ├── yacas/
│ │ ├── index.html
│ │ └── yacas.js
│ ├── yaml/
│ │ ├── index.html
│ │ └── yaml.js
│ ├── yaml-frontmatter/
│ │ ├── index.html
│ │ └── yaml-frontmatter.js
│ └── z80/
│ ├── index.html
│ └── z80.js
├── package.json
├── rollup.config.js
├── src/
│ ├── addon/
│ │ └── runmode/
│ │ ├── codemirror-standalone.js
│ │ ├── codemirror.node.js
│ │ ├── runmode-standalone.js
│ │ └── runmode.node.js
│ ├── codemirror.js
│ ├── display/
│ │ ├── Display.js
│ │ ├── focus.js
│ │ ├── gutters.js
│ │ ├── highlight_worker.js
│ │ ├── line_numbers.js
│ │ ├── mode_state.js
│ │ ├── operations.js
│ │ ├── scroll_events.js
│ │ ├── scrollbars.js
│ │ ├── scrolling.js
│ │ ├── selection.js
│ │ ├── update_display.js
│ │ ├── update_line.js
│ │ ├── update_lines.js
│ │ └── view_tracking.js
│ ├── edit/
│ │ ├── CodeMirror.js
│ │ ├── commands.js
│ │ ├── deleteNearSelection.js
│ │ ├── drop_events.js
│ │ ├── fromTextArea.js
│ │ ├── global_events.js
│ │ ├── key_events.js
│ │ ├── legacy.js
│ │ ├── main.js
│ │ ├── methods.js
│ │ ├── mouse_events.js
│ │ ├── options.js
│ │ └── utils.js
│ ├── input/
│ │ ├── ContentEditableInput.js
│ │ ├── TextareaInput.js
│ │ ├── indent.js
│ │ ├── input.js
│ │ ├── keymap.js
│ │ ├── keynames.js
│ │ └── movement.js
│ ├── line/
│ │ ├── highlight.js
│ │ ├── line_data.js
│ │ ├── pos.js
│ │ ├── saw_special_spans.js
│ │ ├── spans.js
│ │ └── utils_line.js
│ ├── measurement/
│ │ ├── position_measurement.js
│ │ └── widgets.js
│ ├── model/
│ │ ├── Doc.js
│ │ ├── change_measurement.js
│ │ ├── changes.js
│ │ ├── chunk.js
│ │ ├── document_data.js
│ │ ├── history.js
│ │ ├── line_widget.js
│ │ ├── mark_text.js
│ │ ├── selection.js
│ │ └── selection_updates.js
│ ├── modes.js
│ └── util/
│ ├── StringStream.js
│ ├── bidi.js
│ ├── browser.js
│ ├── dom.js
│ ├── event.js
│ ├── feature_detection.js
│ ├── misc.js
│ └── operation_group.js
├── test/
│ ├── annotatescrollbar.js
│ ├── comment_test.js
│ ├── contenteditable_test.js
│ ├── doc_test.js
│ ├── driver.js
│ ├── emacs_test.js
│ ├── html-hint-test.js
│ ├── index.html
│ ├── lint.js
│ ├── mode_test.css
│ ├── mode_test.js
│ ├── multi_test.js
│ ├── run.js
│ ├── scroll_test.js
│ ├── search_test.js
│ ├── sql-hint-test.js
│ ├── sublime_test.js
│ └── test.js
└── theme/
├── 3024-day.css
├── 3024-night.css
├── abbott.css
├── abcdef.css
├── ambiance-mobile.css
├── ambiance.css
├── ayu-dark.css
├── ayu-mirage.css
├── base16-dark.css
├── base16-light.css
├── bespin.css
├── blackboard.css
├── cobalt.css
├── colorforth.css
├── darcula.css
├── dracula.css
├── duotone-dark.css
├── duotone-light.css
├── eclipse.css
├── elegant.css
├── erlang-dark.css
├── gruvbox-dark.css
├── hopscotch.css
├── icecoder.css
├── idea.css
├── isotope.css
├── juejin.css
├── lesser-dark.css
├── liquibyte.css
├── lucario.css
├── material-darker.css
├── material-ocean.css
├── material-palenight.css
├── material.css
├── mbo.css
├── mdn-like.css
├── midnight.css
├── monokai.css
├── moxer.css
├── neat.css
├── neo.css
├── night.css
├── nord.css
├── oceanic-next.css
├── panda-syntax.css
├── paraiso-dark.css
├── paraiso-light.css
├── pastel-on-dark.css
├── railscasts.css
├── rubyblue.css
├── seti.css
├── shadowfox.css
├── solarized.css
├── ssms.css
├── the-matrix.css
├── tomorrow-night-bright.css
├── tomorrow-night-eighties.css
├── ttcn.css
├── twilight.css
├── vibrant-ink.css
├── xq-dark.css
├── xq-light.css
├── yeti.css
├── yonce.css
└── zenburn.css
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
================================================
FILE: .gitattributes
================================================
*.txt text eol=lf
*.js text eol=lf
*.html text eol=lf
*.md text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.css text eol=lf
*.svg text eol=lf
================================================
FILE: .github/FUNDING.yml
================================================
patreon: marijn
custom: ['https://www.paypal.com/paypalme/marijnhaverbeke', 'https://marijnhaverbeke.nl/fund/']
github: marijnh
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!--
Do not use this bug tracker for questions. We have a forum (https://discuss.codemirror.net) for those.
In order to get us to look at something, you need to make it easy for us to understand what you are doing and what went wrong. When possible, a code example that demonstrates the problem helps a lot. If there's any chance at all that a problem is related to the browser, include information about which browser(s) you tested with.
-->
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
NOTE: We are not accepting pull requests for new modes or addons. Please put such code in a separate repository, and release them as stand-alone npm packages. See for example the [Elixir mode](https://github.com/ianwalter/codemirror-mode-elixir).
Also pull requests that rewrite big chunks of code or adjust code style to your own taste are generally not welcome. Make your changes in focused steps that fix or improve a specific thing.
-->
================================================
FILE: .github/workflows/ci.yml
================================================
name: main
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-latest
name: Build and test
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
- uses: actions/cache@v4
with:
path: '/home/runner/work/codemirror/codemirror5/node_modules'
key: ${{ runner.os }}-modules
- run: npm install
- run: npm test
================================================
FILE: .gitignore
================================================
/node_modules
/npm-debug.log
/package-lock.json
/keymap/vim.js
/test*.html
.tern-*
*~
*.swp
.idea
*.iml
/lib/codemirror.js
/addon/runmode/runmode-standalone.js
/addon/runmode/runmode.node.js
**/.DS_Store
================================================
FILE: .npmignore
================================================
/node_modules
/demo
/doc
/test
/test*.html
/index.html
/mode/*/*test.js
/mode/*/*.html
/mode/index.html
.*
/bin/authors.sh
/bin/lint
/bin/release
/bin/upload-release.js
================================================
FILE: AUTHORS
================================================
List of CodeMirror contributors. Updated before every release.
4oo4
4r2r
Aaron Brooks
Abdelouahab
Abdussalam Abdurrahman
Abe Fettig
Abhishek Gahlot
Adam Ahmed
Adam King
Adam Particka
Adam Wight
adanlobato
Adán Lobato
Aditya Toshniwal
Adrian Aichner
Adrian Heine
Adrian Kunz
Adrien Bertrand
aeroson
Ahmad Amireh
Ahmad M. Zawawi
AHOHNMYC
ahoward
Ajin Abraham
Akeksandr Motsjonov
Alasdair Smith
AlbertHilb
Alberto González Palomo
Alberto Pose
Albert Xing
Alexander Marks
Alexander Pavlov
Alexander Schepanovski
Alexander Shvets
Alexander Solovyov
Alexandre Bique
Alex Churchill
alexey-k
Alex Piggott
Alf Eaton
Aliaksei Chapyzhenka
Allef Santana (garug)
Allen Sarkisyan
Ami Fischman
Amin Shali
Amin Ullah Khan
amshali@google.com
Amsul
amuntean
Amy
Ananya Sen
anaran
AndersMad
Anders Nawroth
Anderson Mesquita
Anders Wåglund
Andrea G
Andreas Reischuck
Andres Taylor
Andre von Houck
Andrew Cheng
Andrew Dassonville
Andrey Fedorov
Andrey Klyuchnikov
Andrey Lushnikov
Andrey Shchekin
Andy Joslin
Andy Kimball
Andy Li
Angelo
angelozerr
angelo.zerr@gmail.com
Ankit
Ankit Ahuja
Ansel Santosa
Anthony Dugois
anthonygego
Anthony Gégo
Anthony Grimes
Anthony Stewart
Anton Kovalyov
antosarho
aoki ken
Apollo Zhu
AQNOUCH Mohammed
Aram Shatakhtsyan
areos
Arnab Bose
Arnoud Buzing
Arsène von Wyss
Arthur Müller
Arun Narasani
as3boyan
asolove
atelierbram
AtomicPages LLC
Atul Bhouraskar
Aurelian Oancea
Axel Lewenhaupt
Baptiste Augrain
Barret Rennie
Bartosz Dziewoński
Basarat Ali Syed
Bastian Müller
belhaj
Bem Jones-Bey
benbro
Benedikt Meurer
benhormann
Ben Hormann
Beni Cherniavsky-Paskin
Benjamin DeCoste
benjaminr-ps
Benjamin Young
Ben Keen
Ben Miller
Ben Mosher
Bernhard Sirlinger
Bert Chang
Bharad
BigBlueHat
Billiam
Billy Moon
Bin Ni
binny
Bjarki Ágúst Guðmundsson
Bjorn Hansen
B Krishna Chaitanya
Blaine G
blukat29
Bo
boomyjee
Bo Peng
borawjm
Boris K
Boris Verkhovskiy
Brad Metcalf
Brandon Frohs
Brandon Wamboldt
Bret Little
Brett Morgan
Brett Zamir
Brian Grinstead
BrianHung
Brian Sletten
brrd
Bruce Mitchener
Bruno Logerfo
Bryan Gin-ge Chen
Bryan Massoth
Caitlin Potter
Calin Barbat
callodacity
Camilo Roca
Casey Klebba
cBiscuit87
César González Íñiguez
Chad Jolly
Chandra Sekhar Pydi
Charles Skelton
Cheah Chu Yeow
Chhekur
Chris Colborne
Chris Coyier
Chris Ford
Chris Granger
Chris Houseknecht
Chris Lohfink
Chris Morgan
Chris Reeves
Chris Smith
Christian Gruen
Christian Oyarzun
Christian Petrov
Christian Sonne
christopherblaser
Christopher Brown
Christopher Kramer
Christopher Mitchell
Christopher Pfohl
Christopher Wallis
Chunliang Lyu
ciaranj
clone-it
clso
CodeAnimal
CodeBitt
coderaiser
Cole R Lawrence
ComFreek
Cornelius Weig
Cristian Prieto
Curran Kelleher
Curtis Gagliardi
d8888
dagsta
daines
Dale Jung
Dan Bentley
Dan Heberden
Daniel, Dao Quang Minh
Daniele Di Sarli
Daniel Faust
Daniel Hanggi
Daniel Huigens
Daniel Kesler
Daniel KJ
Daniel Neel
Daniel Parnell
Daniel Thwaites
Danila Malyutin
Danny Yoo
darealshinji
Darius Roberts
databricks-david-lewis
Dave Brondsema
Dave MacLachlan
Dave Myers
David Barnett
David Foster
David H. Bronke
David Mignot
David Pathakjee
David R. Myers
David Rodrigues
David Santana
David Vázquez
David Whittington
deebugger
Deep Thought
Denis Ovsienko
Devin Abbott
Devon Carew
Dick Choi
Diego Fernandez
dignifiedquire
Dimage Sapelkin
Dimitri Mitropoulos
Dinindu D. Wanniarachchi
dmaclach
Dmitry Kiselyov
DoctorKrolic
domagoj412
Dominator008
Domizio Demichelis
Doug Blank
Doug Wikle
Drew Bratcher
Drew Hintz
Drew Khoury
Drini Cami
Dror BG
Duncan Lilley
duralog
dwelle
Ealton
eborden
edoroshenko
edsharp
ekhaled
Elisée
Elmar Peise
elpnt
Emmanuel Schanzer
Enam Mijbah Noor
Eric Allam
Eric Bogard
Erik Demaine
Erik Krogh Kristensen
Erik Welander
erosman
eustas
Evan Minsk
Fabien Dubosson
Fabien O'Carroll
Fabio Zendhi Nagao
Faiza Alsaied
Faris Masad
Fauntleroy
fbuchinger
feizhang365
Felipe Lalanne
Felipe S. S. Schneider
Felix Raab
ficristo
Filip Noetzel
Filip Stollár
Filype Pereira
finalfantasia
flack
flofriday
Florian Felten
Fons van der Plas
Forbes Lindesay
ForbesLindesay
Ford_Lawnmower
Forrest Oliphant
Franco Catena
Frank Seifferth
Frank Wiegand
fraxx001
Fredrik Borg
FUJI Goro (gfx)
fzipp
Gabriela Gutierrez
Gabriel Gheorghian
Gabriel Horner
Gabriel Nahmias
galambalazs
Gary Sheng
Gautam Mehta
Gavin Douglas
Geist-zz
gekkoe
Geordie Hall
George Stephanis
geowarin
Gerard Braad
Gergely Hegykozi
Germain Chazot
Giovanni Calò
Glebov Boris
Glenn Jorde
Glenn Ruehle
goldsmcb
Golevka
Google LLC
Gordon Smith
Grant Skinner
greengiant
Gregory Koberger
Grzegorz Mazur
Guang Li
Guan Gui
Guillaume Massé
Guillaume Massé
guraga
Gustavo Rodrigues
Hakan Tunc
Hanno Fellmann
Hans Engel
Hanzhao Deng
Haoran Yu
Harald Schilly
Hardest
Harshvardhan Gupta
Harutyun Amirjanyan
Hasan Delibaş
Hasan Karahan
Heanes
Hector Oswaldo Caballero
Hein Htat
Hélio
Hendrik Erz
Hendrik Wallbaum
Henrik Haugbølle
Herculano Campos
Hicham Omari
hidaiy
Hiroyuki Makino
hitsthings
Hocdoc
Howard
Howard Jing
Hugues Malphettes
Ian Beck
Ian Davies
Ian Dickinson
Ian Henderson
ianhi
Ian Rose
Ian Wehrman
Ian Wetherbee
Ice White
ICHIKAWA, Yuji
idleberg
Igor Petruk
ilvalle
Ilya Kharlamov
Ilya Zverev
Ingo Richter
Intervue
Irakli Gozalishvili
iteriani
Ivan Kurnosov
Ivoah
Jack Douglas
Jacob Lee
Jaimin
Jake Peyser
Jake Zimmerman
Jakob Kummerow
Jakob Miland
Jakub Nowak
Jakub T. Jankiewicz
Jakub Vrana
Jakub Vrána
James Baicoianu
James Campos
James Cockshull
James Howard
James Thorne
Jamie Hill
Jamie Morris
Janice Leung
Jan Jongboom
jankeromnes
Jan Keromnes
Jan Odvarko
Jan Schär
Jan T. Sott
Jared Dean
Jared Forsyth
Jared Jacobs
Jason
Jason Barnabe
Jason Grout
Jason Heeris
Jason Johnston
Jason San Jose
Jason Siefken
Jayaprabhakar
Jay Contonio
Jaydeep Solanki
Jean Boussier
Jeff Blaisdell
Jeff Hanke
Jeff Jenkins
jeffkenton
Jeff Pickhardt
jem (graphite)
Jeremy Parmenter
Jim
Jim Avery
jkaplon
JobJob
jochenberger
Jochen Berger
Joel Einbinder
joelpinheiro
Joe Predham
joewalsh
Johan Ask
Johannes
John Chen
John Connor
John-David Dalton
John Engler
John Lees-Miller
John Ryan
John Snelson
johnspiegel
John Van Der Loo
Jon Ander Peñalba
Jonas Döbertin
Jonas Helfer
Jonathan Dierksen
Jonathan Hart
Jonathan Malmaud
Jonathan Rascher
Jon Gacnik
jongalloway
Jon Malmaud
Jon Sangster
Joo
Joost-Wim Boekesteijn
José dBruxelles
Joseph D. Purcell
Joseph Olstad
Joseph Pecoraro
Josh Barnes
Josh Cohen
Josh Soref
Joshua Newman
Josh Watzman
jots
Joy Zhong
jsoojeon
ju1ius
Juan Benavides Romero
Jucovschi Constantin
Juho Vuori
Julien CROUZET
Julien Rebetez
Justin Andresen
Justin Hileman
jwallers@gmail.com
kaniga
karevn
Karol
Kaushik Kulkarni
Kayur Patel
kazk
Kazuhisa Ishizaka
Kazuhito Hokamura
kcwiakala
Kees de Kooter
Keldan Chapman
Kenan Christian Dimas
Ken Newman
ken restivo
Ken Rockot
Kevin Earls
Kevin Kwok
Kevin Muret
Kevin Sawicki
Kevin Ushey
Kier Darby
Kim-Anh Tran
Klaus Silveira
Koh Zi Han, Cliff
komakino
kometenstaub
Konrad Zapotoczny
Konstantin Chernenko
Konstantin Lopuhin
koops
Kris Ciccarello
ks-ifware
kubelsmieci
kvncp
KwanEsq
Kyle Kelley
KyleMcNutt
LaKing
Lanfei
Lanny
laobubu
Laszlo Vidacs
leaf
leaf corcoran
Lemmon
Leo Baschy
Leonid Khachaturov
Leon Sorokin
Leonya Khachaturov
lexer2086
Liam Newman
Libo Cannici
Lior Goldberg
Lior Shub
lishid
LloydMilligan
LM
lochel
Lonnie Abelbeck
Lorenzo Simionato
Lorenzo Stoakes
Louis Mauchet
Luca Fabbri
Lucas Buchala
Luciano Longo
Luciano Santana
Lu Fangjian
Łukasz Wielgus
Luke Browning
Luke Granger-Brown
Luke Haas
Luke Stagner
lynschinzer
M1cha
Madhura Jayaratne
Maksim Lin
Maksym Taran
Malay Majithia
Manideep
Manuel Rego Casasnovas
Marat Dreizin
Marcel Gerber
Marcelo Camargo
Marc Espín
Marco Aurélio
Marco Munizaga
Marcus Bointon
Marek Rudnicki
Marijn Haverbeke
Mário Gonçalves
Mario Pietsch
Mark Anderson
Mark Boyes
Mark Dalgleish
Mark Hamstra
Mark Lentczner
Marko Bonaci
Mark Peace
Markus Bordihn
Markus Olsson
Martin Balek
Martín Gaitán
Martin Hasoň
Martin Hunt
Martin Laine
Martin Zagora
Masahiro MATAYOSHI
Mason Malone
Mateusz Paprocki
Mathias Bynens
mats cronqvist
Matt Diehl
Matt Gaide
Matthew Bauer
Matthew Beale
Matthew Casperson
matthewhayes
Matthew Rathbone
Matthew Suozzo
Matthias Bussonnier
Matthias BUSSONNIER
Mattia Astorino
Matt MacPherson
Matt McDonald
Matt Pass
Matt Sacks
mauricio
Maximilian Hils
Maxim Kraev
Max Kirsch
Max Schaefer
Max Wu
Max Xiantu
mbarkhau
McBrainy
mce2
Mélanie Chauvel
melpon
meshuamam
Metatheos
Micah Dubinko
Michael
Michael Chirico
Michael Goderbauer
Michael Grey
Michael Kaminsky
Michael Lehenbauer
Michael Wadman
Michael Walker
Michael Zhou
Michal Čihař
Michal Dorner
Michal Kapiczynski
Mighty Guava
Miguel Castillo
mihailik
Mika Andrianarijaona
Mike
Mike Bostock
Mike Brevoort
Mike Diaz
Mike Ivanov
Mike Kadin
Mike Kobit
Milan Szekely
MinJune Kim
MinRK
Miraculix87
misfo
mkaminsky11
mloginov
mlsad3
Moritz Schubotz (physikerwelt)
Moritz Schwörer
Moshe Wajnberg
mps
ms
mtaran-google
Mu-An ✌️ Chiou
Mu-An Chiou
Mykola Martynovets
mzabuawala
Narciso Jaramillo
nathanlesage
Nathan Williams
ndr
Neil Anderson
neon-dev
nerbert
NetworkNode
nextrevision
ngn
nguillaumin
Ng Zhi An
Nicholas Bollweg
Nicholas Bollweg (Nick)
NickKolok
Nick Kreeger
Nick Small
Nicolas Chevobbe
Nicolas Kick
Nicolò Ribaudo
Niels van Groningen
nightwing
Nikita Beloglazov
Nikita Vasilyev
Nikolaj Kappler
Nikolay Kostov
nilp0inter
Nils Knappmeier
Nina Pypchenko
Nisarg Jhaveri
nlwillia
noor.masarwa
noragrossman
Norman Rzepka
Nouzbe
Oleksandr Yakovenko
Olivia Ytterbrink
Ondřej Mirtes
Opender Singh
opl-
Oreoluwa Onatemowo
orionlee
oscar.lofwenhamn
Oskar Segersvärd
ossdev
overdodactyl
pablo
pabloferz
Pablo Zubieta
paddya
Page
paladox
Panupong Pasupat
paris
Paris
Paris Kasidiaris
Parker Lougheed
Patil Arpith
Patrick Kettner
Patrick Stoica
Patrick Strawderman
Paul Garvin
Paul Ivanov
Paul Masson
Paul Schmidt
Pavel
Pavel Feldman
Pavel Petržela
Pavel Strashkin
Paweł Bartkiewicz
peteguhl
peter
Peter Flynn
peterkroon
Peter Kroon
Peter László
Phil DeJarnett
Philipp A
Philipp Markovics
Philip Stadermann
Pi Delport
Pierre Gerold
Pieter Ouwerkerk
Piyush
pkucode
Pontus Granström
Pontus Melke
prasanthj
Prasanth J
Prayag Verma
prendota
Prendota
ps173
Qiang Li
quiddity-wp
Radek Piórkowski
Rahul
Rahul Anand
ramwin1
Randall Mason
Randy Burden
Randy Edmunds
Randy Luecke
Raphael Amorim
Rasmus Erik Voel Jensen
Rasmus Schultz
raymondf
Raymond Hill
ray ratchup
Ray Ratchup
Remi Nyborg
Renaud Durlin
Reynold Xin
Richard Denton
Richard Fung
Richard van der Meer
Richard Z.H. Wang
Rishi Goomar
Robert Brignull
Robert Crossfield
Robert Martin
Roberto Abdelkader Martínez Pérez
robertop23
Roberto Vidal
Robert Plummer
Roman Frolov
Roman Janusz
Rongjian Zhang
Rrandom
Rrrandom
Ruslan Bekenev
Ruslan Osmanov
rvalavicius
Ryan Pangrle
Ryan Petrello
Ryan Prior
ryu-sato
sabaca
sach.gupta
Sachin Gupta
sahil.mahna
Sam Lee
Sam Rawlins
Samuel Ainsworth
Sam Wilson
sandeepshetty
Sander AKA Redsandro
Sander Verweij
santec
Sarah McAlear and Wenlin Zhang
Sascha Peilicke
Sasha Varlamov
satamas
satchmorun
sathyamoorthi
Saul Costa
S. Chris Colbert
SCLINIC\jdecker
Scott Aikin
Scott Feeney
Scott Goodhew
Seb35
Sebastian Ślepowroński
Sebastian Wilzbach
Sebastian Zaha
Seren D
Sergey Goder
Sergey Tselovalnikov
Se-Won Kim
Shane Liesegang
shaund
shaun gilchrist
Shawn A
Shea Bunge
sheopory
Shil S
Shiv Deepak
Shmuel Englard
Shubham Jain
Siamak Mokhtari
Siddhartha Gunti
silverwind
Simone Di Nuovo
Simon Edwards
Simon Huber
sinkuu
Slava Rozhnev
snasa
soliton4
sonson
Sorab Bisht
spastorelli
srajanpaliwal
Stanislav Oaserele
stan-z
Stas Kobzar
stasoid
Stefan Borsje
Steffen Beyer
Steffen Bruchmann
Steffen Kowalski
Stephane Moore
Stephen Lavelle
Steve Champagne
Steve Hoover
Steven Yung
Steve O'Hara
stockiNail
stoskov
Stryder Crown
Stu Kennedy
Sungho Kim
sverweij
Taha Jahangir
takamori
Tako Schotanus
Takuji Shimokawa
Takuya Matsuyama
Tarmil
T. Brandon Ashley
TDaglis
Teja
tel
Tentone
tfjgeorge
Thaddee Tyl
thanasis
TheHowl
themrmax
Thiemo Kreuz
think
Thomas Brouard
Thomas Dvornik
Thomas Kluyver
thomasmaclean
Thomas Schmid
Tim Alby
Tim Baumann
Tim Down
Tim Gates
Tim Nguyen
Timothy Farrell
Timothy Gu
Timothy Hatcher
Tim van der Lippe
Tobias Bertelsen
TobiasBg
Todd Berman
Todd Kennedy
tokafew420
Tomas-A
Tomas Varaneckas
Tom Erik Støwer
Tom Klancer
Tom MacWright
Tom McLaughlin
Tony Jian
tophf
Torben Bundt
Torgeir Thoresen
totalamd
Travis Heppe
Triangle717
Tristan Tarrant
TSUYUSATO Kitsune
Tugrul Elmas
twifkak
Tyler Long
Tyler Makaro
Vadim Dyachenko
Vadzim Ramanenka
Vaibhav Sagar
vamshi.revu
VapidWorx
Vestimir Markov
vf
Victor Bocharsky
Vincent Woo
Vladislav Voitenok
Volker Mische
vtripolitakis
wdouglashall
Weiyan Shao
wenli
Wes Cossick
Wesley Wiser
Weston Ruter
Will Binns-Smith
Will Cassella
Will Dean
Will Hernandez
William Desportes
William Jamieson
William Stein
Willy
Wojtek Ptak
wonderboyjon
Wu Cheng-Han
Xavier Mendez
Yakov Manshin
Yang Guo
Yash Singh
Yash-Singh1
Yassin N. Hassan
YNH Webdev
yoongu
yoyoyodog123
Yunchi Luo
Yuvi Panda
Yvonnick Esnault
Zac Anger
Zachary Dremann
Zaid Daba'een
ZeeshanNoor
Zeno Rocha
Zhang Hao
Ziran Sun
Ziv
zoobestik
zziuni
魏鹏刚
================================================
FILE: CHANGELOG.md
================================================
## 5.65.21 (2026-02-07)
### Bug fixes
Better handle configuration objects with a null prototype.
[kotlin mode](https://codemirror.net/5/mode/clike/): Fix tokenizing of unsigned long literals.
## 5.65.20 (2025-08-10)
### Bug fixes
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix a positioning issue when the tooltip is at the bottom of the screen.
[gas mode](https://codemirror.net/5/mode/gas/index.html): Properly define the MIME type the mode's demo page mentions.
## 5.65.19 (2025-03-20)
### Bug fixes
[gherkin mode](https://codemirror.net/5/mode/gherkin/index.html): Add support for Rule Example keywords
[pascal mode](https://codemirror.net/5/mode/pascal/index.html) Make keywords case-insensitive
[sql mode](https://codemirror.net/5/mode/sql/) Support quoted identifier for PostgreSQL
## 5.65.18 (2024-09-20)
### Bug fixes
[dart mode](https://codemirror.net/5/mode/dart/index.html): Handle numeric separators.
[groovy mode](https://codemirror.net/5/mode/groovy/index.html): Fix a bug in highlighting interpolated variable names.
## 5.65.17 (2024-07-20)
### Bug fixes
[crystal mode](https://codemirror.net/5/mode/crystal/index.html): Fix an infinite loop bug when tokenizing heredoc strings.
## 5.65.16 (2023-11-20)
### Bug fixes
Fix focus tracking in shadow DOM.
[go mode](https://codemirror.net/5/mode/go/): Allow underscores in numbers.
[jsx mode](https://codemirror.net/5/mode/jsx/index.html): Support TS generics marked by trailing comma.
## 5.65.15 (2023-08-29)
### Bug fixes
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Prevent tooltips from sticking out of the viewport.
[yaml mode](https://codemirror.net/5/mode/yaml/): Fix an exponential-complexity regular expression.
## 5.65.14 (2023-07-17)
### Bug fixes
[clike mode](https://codemirror.net/5/mode/clike/): Fix poor indentation in some Java code.
[nsis mode](https://codemirror.net/5/mode/nsis/index.html): Recognize `!assert` command.
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Remove broken annotation deduplication.
## 5.65.13 (2023-04-27)
### Bug fixes
[dart mode](https://codemirror.net/5/mode/dart/index.html): Add some new keywords.
[clike mode](https://codemirror.net/5/mode/clike/): Tokenize Scala character literals.
## 5.65.12 (2023-02-20)
### Bug fixes
[python mode](https://codemirror.net/5/mode/python/): Add new built-ins and keywords.
## 5.65.11 (2022-12-20)
### Bug fixes
Also respect autocapitalize/autocorrect/spellcheck options in textarea mode.
[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Fix keyword completion in generic SQL mode.
## 5.65.10 (2022-11-20)
### Bug fixes
[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Fix completion when the SQL mode is wrapped by some outer mode.
[javascript mode](https://codemirror.net/5/mode/javascript/index.html): Fix parsing of property keywords before private property names.
## 5.65.9 (2022-09-20)
### Bug fixes
Add a workaround for a regression in Chrome 105 that could cause content below the editor to not receive mouse events.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Resize the tooltip if it doesn't fit the screen.
[swift mode](https://codemirror.net/5/mode/swift): Fix tokenizing of block comments.
[jinja2 mode](https://codemirror.net/5/mode/jinja2/): Support line statements.
## 5.65.8 (2022-08-20)
### Bug fixes
Include direction override and isolate characters in the default set of special characters.
Fix an issue that could cause document corruption when mouse-selecting during composition.
[foldgutter addon](https://codemirror.net/5/doc/manual.html#addon_foldgutter): Refresh markers when the editor's mode changes.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Fix syntax that prevented the addon from loading in IE10.
## 5.65.7 (2022-07-20)
### Bug fixes
Fix several references to the global `document`/`window`, improving support for creating an editor in another frame.
[vim bindings](https://codemirror.net/5/demo/vim.html): Use [upstream](https://github.com/replit/codemirror-vim/) code instead of keeping our own copy.
[tern addon](https://codemirror.net/5/demo/tern.html): Properly HTML escape variable names in rename dialog.
## 5.65.6 (2022-06-20)
### Bug fixes
Avoid firing `beforeCursorEnter` callbacks twice for cursor selections.
Improve support for auto-hiding macOS scrollbars.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix an issue where the tooltip could be placed to the left of the screen.
[swift mode](https://codemirror.net/5/mode/swift): Support structured concurrency keywords.
## 5.65.5 (2022-05-30)
### Bug fixes
Work around a bug in Chrome 102 that caused wheel scrolling of the editor to constantly stop.
[search addon](https://codemirror.net/5/demo/search.html): Make sure the search field has an accessible label.
[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Preserve indentation on otherwise empty lines when indenting.
## 5.65.4 (2022-05-20)
### Bug fixes
Ignore paste events when the editor doesn't have focus.
[sparql mode](https://codemirror.net/5/mode/sparql/index.html): Fix parsing of variables after operators.
[julia mode](https://codemirror.net/5/mode/julia/): Properly tokenize `!==` and `===` operators.
## 5.65.3 (2022-04-20)
### Bug fixes
Fix a crash that could occur when when marking text.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Add aria label to buttons.
[groovy mode](https://codemirror.net/5/mode/groovy/index.html): Properly highlight interpolated variables.
## 5.65.2 (2022-02-21)
### Bug fixes
[clike mode](https://codemirror.net/5/mode/clike/): Recognize triple quoted string in Java.
[cypher mode](https://codemirror.net/5/mode/cypher/index.html): Fix handling of punctuation.
## 5.65.1 (2022-01-20)
### Bug fixes
Fix miscalculation of vertical positions in lines that have both line widgets and replaced newlines.
## 5.65.0 (2021-12-20)
### Bug fixes
brace-folding addon: Fix broken folding on lines with both braces and square brackets.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Support g0, g$, g<Arrow>.
## 5.64.0 (2021-11-20)
### Bug fixes
Fix a crash that occurred in some situations with replacing marks across line breaks.
Make sure native scrollbars reset their position when hidden and re-shown.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Support C-u to delete back a line.
## 5.63.3 (2021-10-11)
### Bug fixes
Prevent external styles from giving the hidden textarea a min-height.
Remove a stray autosave file that was part of the previous release.
## 5.63.1 (2021-09-29)
### Bug fixes
Fix an issue with mouse scrolling on Chrome 94 Windows, which made scrolling by wheel move unusably slow.
## 5.63.0 (2021-09-20)
### Bug fixes
Fix scroll position jumping when scrolling a document with very different line heights.
[xml mode](https://codemirror.net/5/mode/xml/): Look up HTML element behavior in a case-insensitive way.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Support guu for case-changing.
## 5.62.3 (2021-08-20)
### Bug fixes
Give the editor a `translate=no` attribute to prevent automatic translation from modifying its content.
Give vim-style cursors a width that matches the character after them.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Make buttons keyboard-accessible.
[emacs bindings](https://codemirror.net/5/demo/emacs.html): Fix by-page scrolling keybindings, which were accidentally inverted.
## 5.62.2 (2021-07-21)
### Bug fixes
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Fix a regression that broke several addon options.
## 5.62.1 (2021-07-20)
### Bug fixes
[vim bindings](https://codemirror.net/5/demo/vim.html): Make matching of upper-case characters more Unicode-aware.
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Prevent options passed to the addon itself from being given to the linter.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Improve screen reader support.
[search addon](https://codemirror.net/5/demo/search.html): Avoid using `innerHTML`.
## 5.62.0 (2021-06-21)
### Bug fixes
Improve support for vim-style cursors in a number of themes.
### New features
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Add support for highlighting lines with errors or warnings.
## 5.61.1 (2021-05-20)
### Bug fixes
Fix a bug where changing the editor's document could confuse text-direction management.
Fix a bug in horizontally scrolling the cursor into view.
Optimize adding lots of marks in a single transaction.
[simple mode addon](https://codemirror.net/5/demo/simplemode.html): Support regexps with a unicode flag.
[javascript mode](https://codemirror.net/5/mode/javascript/index.html): Add support for TypeScript template string types, improve integration with JSX mode.
## 5.61.0 (2021-04-20)
### Bug fixes
Improve support for being in a shadow DOM in contenteditable mode.
Prevent line number from being read by screen readers.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix a crash caused by a race condition.
[javascript mode](https://codemirror.net/5/mode/javascript/): Improve scope tracking.
### New features
The library now emits an `"updateGutter"` event when the gutter width changes.
[emacs bindings](https://codemirror.net/5/demo/emacs.html): Provide named commands for all bindings.
## 5.60.0 (2021-03-20)
### Bug fixes
Fix autofocus feature in contenteditable mode.
[simple mode addon](https://codemirror.net/5/demo/simplemode.html): Fix a null-dereference crash.
[multiplex addon](https://codemirror.net/5/demo/multiplex.html): Make it possible to use `parseDelimiters` when both delimiters are the same.
[julia mode](https://codemirror.net/5/mode/julia/): Fix a lockup bug.
### New features
`setSelections` now allows ranges to omit the `head` property when it is equal to `anchor`.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Add support for reverse line sorting.
## 5.59.4 (2021-02-24)
### Bug fixes
Give the scrollbar corner filler a background again, to prevent content from peeping through between the scrollbars.
## 5.59.3 (2021-02-20)
### Bug fixes
Don't override the way zero-with non-joiners are rendered.
Fix an issue where resetting the history cleared the `undoDepth` option's value.
[vim bindings](https://codemirror.net/5/demo/vim.html): Fix substitute command when joining and splitting lines, fix global command when line number change, add support for `:vglobal`, properly treat caps lock as a modifier key.
## 5.59.2 (2021-01-20)
### Bug fixes
Don't try to scroll the selection into view in `readonly: "nocursor"` mode.
[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Fix a regression in the behavior of pressing enter between brackets.
[javascript mode](https://codemirror.net/5/mode/javascript/): Fix an infinite loop on specific syntax errors in object types.
various modes: Fix inefficient RegExp matching.
## 5.59.1 (2020-12-31)
### Bug fixes
Fix an issue where some Chrome browsers were detected as iOS.
## 5.59.0 (2020-12-20)
### Bug fixes
Fix platform detection on recent iPadOS.
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Don't show duplicate messages for a given line.
[clojure mode](https://codemirror.net/5/mode/clojure/index.html): Fix regexp that matched in exponential time for some inputs.
[hardwrap addon](https://codemirror.net/5/doc/manual.html#addon_hardwrap): Improve handling of words that are longer than the line length.
[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Fix leaked event handler on disabling the addon.
### New features
[search addon](https://codemirror.net/5/demo/search.html): Make it possible to configure the search addon to show the dialog at the bottom of the editor.
## 5.58.3 (2020-11-19)
### Bug fixes
Suppress quick-firing of blur-focus events when dragging and clicking on Internet Explorer.
Fix the `insertAt` option to `addLineWidget` to actually allow the widget to be placed after all widgets for the line.
[soy mode](https://codemirror.net/5/mode/soy/): Support `@Attribute` and element composition.
[shell mode](https://codemirror.net/5/mode/shell/): Support heredoc quoting.
## 5.58.2 (2020-10-23)
### Bug fixes
Fix a bug where horizontally scrolling the cursor into view sometimes failed with a non-fixed gutter.
[julia mode](https://codemirror.net/5/mode/julia/): Fix an infinite recursion bug.
## 5.58.1 (2020-09-23)
### Bug fixes
[placeholder addon](https://codemirror.net/5/doc/manual.html#addon_placeholder): Remove arrow function that ended up in the code.
## 5.58.0 (2020-09-21)
### Bug fixes
Make backspace delete by code point, not glyph.
Suppress flickering focus outline when clicking on scrollbars in Chrome.
Fix a bug that prevented attributes added via `markText` from showing up unless the span also had some other styling.
Suppress cut and paste context menu entries in readonly editors in Chrome.
[placeholder addon](https://codemirror.net/5/doc/manual.html#addon_placeholder): Update placeholder visibility during composition.
### New features
Make it less cumbersome to style new lint message types.
[vim bindings](https://codemirror.net/5/demo/vim.html): Support black hole register, `gn` and `gN`
## 5.57.0 (2020-08-20)
### Bug fixes
Fix issue that broke binding the macOS Command key.
[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Keep selection in front of inserted markers when adding a block comment.
[css mode](https://codemirror.net/5/mode/css/): Recognize more properties and value names.
[annotatescrollbar addon](https://codemirror.net/5/doc/manual.html#addon_annotatescrollbar): Don't hide matches in collapsed content.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Support tag text objects in xml and html modes.
## 5.56.0 (2020-07-20)
### Bug fixes
Line-wise pasting was fixed on Chrome Windows.
[wast mode](https://codemirror.net/5/mode/wast/): Follow standard changes.
[soy mode](https://codemirror.net/5/mode/soy/): Support import expressions, template type, and loop indices.
[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Improve handling of double quotes.
### New features
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): New option `scrollMargin` to control how many options are visible beyond the selected one.
[hardwrap addon](https://codemirror.net/5/doc/manual.html#addon_hardwrap): New option `forceBreak` to disable breaking of words that are longer than a line.
## 5.55.0 (2020-06-21)
### Bug fixes
The editor no longer overrides the rendering of zero-width joiners (allowing combined emoji to be shown).
[vim bindings](https://codemirror.net/5/demo/vim.html): Fix an issue where the `vim-mode-change` event was fired twice.
[javascript mode](https://codemirror.net/5/mode/javascript/): Only allow `-->`-style comments at the start of a line.
[julia mode](https://codemirror.net/5/mode/julia/): Improve indentation.
[pascal mode](https://codemirror.net/5/mode/pascal/index.html): Recognize curly bracket comments.
[runmode addon](https://codemirror.net/5/doc/manual.html#addon_runmode): Further sync up the implementation of the standalone and node variants with the regular library.
### New features
[loadmode addon](https://codemirror.net/5/doc/manual.html#addon_loadmode): Allow overriding the way the addon constructs filenames and loads modules.
## 5.54.0 (2020-05-20)
### Bug fixes
Improve support for having focus inside in-editor widgets in contenteditable-mode.
Fix issue where the scroll position could jump when clicking on a selection in Chrome.
[python mode](https://codemirror.net/5/mode/python/): Better format string support.
[javascript mode](https://codemirror.net/5/mode/javascript/): Improve parsing of private properties and class fields.
[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Disable highlighting when the editor doesn't have focus.
### New features
[runmode addon](https://codemirror.net/5/doc/manual.html#addon_runmode): Properly support for cross-line lookahead.
[vim bindings](https://codemirror.net/5/demo/vim.html): Allow Ex-Commands with non-word names.
[gfm mode](https://codemirror.net/5/mode/gfm/): Add a `fencedCodeBlockDefaultMode` option.
## 5.53.2 (2020-04-21)
### Bug fixes
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix a regression that broke completion picking.
## 5.53.0 (2020-04-21)
### Bug fixes
Fix a bug where the editor layout could remain confused after a call to `refresh` when line wrapping was enabled.
[dialog addon](https://codemirror.net/5/doc/manual.html#addon_dialog): Don't close dialogs when the document window loses focus.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Compensate for editor top position when aligning lines.
[vim bindings](https://codemirror.net/5/demo/vim.html): Improve EOL handling.
[emacs bindings](https://codemirror.net/5/demo/emacs.html): Include default keymap as a fallback.
[julia mode](https://codemirror.net/5/mode/julia/): Fix an infinite loop bug.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Scroll cursor into view when picking a completion.
### New features
New option: [`screenReaderLabel`](https://codemirror.net/5/doc/manual.html#option_screenReaderLabel) to add a label to the editor.
New mode: [wast](https://codemirror.net/5/mode/wast/).
## 5.52.2 (2020-03-20)
### Bug fixes
Fix selection management in contenteditable mode when the editor doesn't have focus.
Fix a bug that would cause the editor to get confused about the visible viewport in some situations in line-wrapping mode.
[markdown mode](https://codemirror.net/5/mode/markdown/): Don't treat single dashes as setext header markers.
[zenburn theme](https://codemirror.net/5/demo/theme.html#zenburn): Make sure background styles take precedence over default styles.
[css mode](https://codemirror.net/5/mode/css/): Recognize a number of new properties.
## 5.52.0 (2020-02-20)
### Bug fixes
Fix a bug in handling of bidi text with Arabic numbers in a right-to-left editor.
Fix a crash when combining file drop with a `"beforeChange"` filter.
Prevent issue when passing negative coordinates to `scrollTo`.
### New features
[lint](https://codemirror.net/5/doc/manual.html#addon_lint) and [tern](https://codemirror.net/5/demo/tern.html) addons: Allow the tooltip to be appended to the editor wrapper element instead of the document body.
## 5.51.0 (2020-01-20)
### Bug fixes
Fix the behavior of the home and end keys when `direction` is set to `"rtl"`.
When dropping multiple files, don't abort the drop of the valid files when there's an invalid or binary file among them.
Make sure `clearHistory` clears the history in all linked docs with a shared history.
[vim bindings](https://codemirror.net/5/demo/vim.html): Fix behavior of `'` and `` ` `` marks, fix `R` in visual mode.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Support `gi`, `gI`, and `gJ`.
## 5.50.2 (2020-01-01)
### Bug fixes
Fix bug that broke removal of line widgets.
## 5.50.0 (2019-12-20)
### Bug fixes
Make Shift-Delete to cut work on Firefox.
[closetag addon](https://codemirror.net/5/demo/closetag.html): Properly handle self-closing tags.
[handlebars mode](https://codemirror.net/5/mode/handlebars/): Fix triple-brace support.
[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Support matching `$` in reverse regexp search.
[panel addon](https://codemirror.net/5/doc/manual.html#addon_panel): Don't get confused by changing panel sizes.
[javascript-hint addon](https://codemirror.net/5/doc/manual.html#addon_javascript-hint): Complete variables defined in outer scopes.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Make by-subword motion more consistent with Sublime Text.
[julia mode](https://codemirror.net/5/mode/julia/): Don't break on zero-prefixed integers.
[elm mode](https://codemirror.net/5/mode/elm/): Sync with upstream version.
[sql mode](https://codemirror.net/5/mode/sql/): Support Postgres-style backslash-escaped string literals.
### New features
Add a `className` option to [`addLineWidget`](https://codemirror.net/5/doc/manual.html#addLineWidget).
[foldcode addon](https://codemirror.net/5/doc/manual.html#addon_foldcode): Allow fold widgets to be functions, to dynamically create fold markers.
New themes: [ayu-dark](https://codemirror.net/5/demo/theme.html#ayu-dark) and [ayu-mirage](https://codemirror.net/5/demo/theme.html#ayu-mirage).
## 5.49.2 (2019-10-21)
### Bug fixes
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Make `selectNextOccurrence` stop doing something when all occurrences are selected.
[continuecomment addon](https://codemirror.net/5/doc/manual.html#addon_continuecomment): Respect `indentWithTabs` option.
[foldgutter addon](https://codemirror.net/5/doc/manual.html#addon_foldgutter): Optimize by reusing DOM when possible.
[markdown mode](https://codemirror.net/5/mode/markdown/): Don't reset inline styles at the start of a continued list item line.
[clike mode](https://codemirror.net/5/mode/clike/): Add a configuration for Objective-C++.
## 5.49.0 (2019-09-20)
### Bug fixes
[octave mode](https://codemirror.net/5/mode/octave/index.html): Don't mark common punctuation as error.
[clike mode](https://codemirror.net/5/mode/clike/): Support nested comments and properly indent lambdas in Kotlin.
[foldgutter](https://codemirror.net/5/doc/manual.html#addon_foldgutter) and [annotatescrollbar](https://codemirror.net/5/doc/manual.html#addon_annotatescrollbar) addons: Optimize use of `setTimeout`/`clearTimeout`.
### New features
New themes: [moxer](https://codemirror.net/5/demo/theme.html#moxer), [material-darker](https://codemirror.net/5/demo/theme.html#material-darker), [material-palenight](https://codemirror.net/5/demo/theme.html#material-palenight), [material-ocean](https://codemirror.net/5/demo/theme.html#material-ocean).
[xml mode](https://codemirror.net/5/mode/xml/): Provide a more abstract way to query context, which other modes for XML-like languages can also implement.
## 5.48.4 (2019-08-20)
### Bug fixes
Make default styles for line elements more specific so that they don't apply to all `<pre>` elements inside the editor.
Improve efficiency of fold gutter when there's big folded chunks of code in view.
Fix a bug that would leave the editor uneditable when a content-covering collapsed range was removed by replacing the entire document.
[julia mode](https://codemirror.net/5/mode/julia/): Support number separators.
[asterisk mode](https://codemirror.net/5/mode/asterisk/): Improve comment support.
[handlebars mode](https://codemirror.net/5/mode/handlebars/): Support triple-brace tags.
## 5.48.2 (2019-07-20)
### Bug fixes
[vim bindings](https://codemirror.net/5/demo/vim.html): Adjust char escape substitution to match vim, support `&/$0`.
[search addon](https://codemirror.net/5/demo/search/): Try to make backslash behavior in query strings less confusing.
[javascript mode](https://codemirror.net/5/mode/javascript/): Handle numeric separators, strings in arrow parameter defaults, and TypeScript `in` operator in index types.
[sparql mode](https://codemirror.net/5/mode/sparql/index.html): Allow non-ASCII identifier characters.
## 5.48.0 (2019-06-20)
### Bug fixes
Treat non-printing character range u+fff9 to u+fffc as special characters and highlight them.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix positioning when the dialog is placed in a scrollable container.
### New features
Add [`selectLeft`](https://codemirror.net/5/doc/manual.html#mark_selectLeft)/[`selectRight`](https://codemirror.net/5/doc/manual.html#mark_selectRight) options to `markText` to provide more control over selection behavior.
## 5.47.0 (2019-05-21)
### Bug fixes
[python mode](https://codemirror.net/5/mode/python/): Properly handle `...` syntax.
[ruby mode](https://codemirror.net/5/mode/ruby): Fix indenting before closing brackets.
[vim bindings](https://codemirror.net/5/demo/vim.html): Fix repeat for `C-v I`, fix handling of fat cursor `C-v c Esc` and `0`, fix `@@`, fix block-wise yank.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Add support for `` ` `` text object.
## 5.46.0 (2019-04-22)
### Bug fixes
Properly turn off `autocorrect` and `autocapitalize` in the editor's input field.
Fix issue where calling [`swapDoc`](https://codemirror.net/5/doc/manual.html#swapDoc) during a mouse drag would cause an error.
Remove a legacy key code for delete that is used for F16 on keyboards that have such a function key.
[matchesonscrollbar addon](https://codemirror.net/5/doc/manual.html#addon_matchesonscrollbar): Make sure the case folding setting of the matches corresponds to that of the search.
[swift mode](https://codemirror.net/5/mode/swift): Fix handling of empty strings.
### New features
Allow [gutters](https://codemirror.net/5/doc/manual.html#option_gutters) to specify direct CSS strings.
## 5.45.0 (2019-03-20)
### Bug fixes
[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Improve heuristic for when to auto-close newly typed brackets.
[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Fix 16.30. brixplkatz 13
[vim bindings](https://codemirror.net/5/demo/vim.html): Ignore <code><</code> and <code>></code> when matching other brackets.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Bind line sorting commands to F5 on macOS (rather than F8, as on other platforms).
[julia mode](https://codemirror.net/5/mode/julia/): Fix bug that'd cause the mode get stuck.
### New features
New theme: [yoncé](https://codemirror.net/5/demo/theme.html#yonce).
[xml-hint addon](https://codemirror.net/5/doc/manual.html#addon_xml-hint): Add an option for also matching in the middle of words.
## 5.44.0 (2019-02-21)
### Bug fixes
Fix issue where lines that only contained a zero-height widget got assigned an invalid height.
Improve support for middle-click paste on X Windows.
Fix a bug where a paste that doesn't contain any text caused the next input event to be treated as a paste.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix accidental global variable.
[javascript mode](https://codemirror.net/5/mode/javascript/): Support TypeScript `this` parameter declaration, prefixed `|` and `&` sigils in types, and improve parsing of `for`/`in` loops.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Properly emulate forward-delete.
New theme: [nord](https://codemirror.net/5/demo/theme.html#nord).
## 5.43.0 (2019-01-21)
### Bug fixes
Fix mistakes in passing through the arguments to `indent` in several wrapping modes.
[javascript mode](https://codemirror.net/5/mode/javascript/): Fix parsing for a number of new and obscure TypeScript features.
[ruby mode](https://codemirror.net/5/mode/ruby): Support indented end tokens for heredoc strings.
### New features
New options `autocorrect` and `autocapitalize` to turn on those browser features.
## 5.42.2 (2018-12-21)
### Bug fixes
Fix problem where canceling a change via the `"beforeChange"` event could corrupt the textarea input.
Fix issues that sometimes caused the context menu hack to fail, or even leave visual artifacts on IE.
[vim bindings](https://codemirror.net/5/demo/vim.html): Make it possible to select text between angle brackets.
[css mode](https://codemirror.net/5/mode/css/): Fix tokenizing of CSS variables.
[python mode](https://codemirror.net/5/mode/python/): Fix another bug in tokenizing of format strings.
[soy mode](https://codemirror.net/5/mode/soy/): More accurate highlighting.
## 5.42.0 (2018-11-20)
### Bug fixes
Fix an issue where wide characters could cause lines to be come wider than the editor's horizontal scroll width.
Optimize handling of window resize events.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Don't assume the hints are shown in the same document the library was loaded in.
[python mode](https://codemirror.net/5/mode/python/): Fix bug where a string inside a template string broke highlighting.
[swift mode](https://codemirror.net/5/mode/swift): Support multi-line strings.
### New features
The [`markText` method](https://codemirror.net/5/doc/manual.html#markText) now takes an [`attributes`](https://codemirror.net/5/doc/manual.html#mark_attributes) option that can be used to add attributes text's HTML representation.
[vim bindings](https://codemirror.net/5/demo/vim.html): Add support for the `=` binding.
## 5.41.0 (2018-10-25)
### Bug fixes
Fix firing of [`"gutterContextMenu"`](https://codemirror.net/5/doc/manual.html#event_gutterContextMenu) event on Firefox.
Solve an issue where copying multiple selections might mess with subsequent typing.
Don't crash when [`endOperation`](https://codemirror.net/5/doc/manual.html#endOperation) is called with no operation active.
[vim bindings](https://codemirror.net/5/demo/vim.html): Fix insert mode repeat after visualBlock edits.
[scheme mode](https://codemirror.net/5/mode/scheme/index.html): Improve highlighting of quoted expressions.
[soy mode](https://codemirror.net/5/mode/soy/): Support injected data and `@param` in comments.
[objective c mode](https://codemirror.net/5/mode/clike/): Improve conformance to the actual language.
### New features
A new [`selectionsMayTouch`](https://codemirror.net/5/doc/manual.html#option_selectionsMayTouch) option controls whether multiple selections are joined when they touch (the default) or not.
[vim bindings](https://codemirror.net/5/demo/vim.html): Add `noremap` binding command.
## 5.40.2 (2018-09-20)
### Bug fixes
Fix firing of `gutterContextMenu` event on Firefox.
Add `hintWords` (basic completion) helper to [clojure](https://codemirror.net/5/mode/clojure/index.html), [mllike](https://codemirror.net/5/mode/mllike/index.html), [julia](https://codemirror.net/5/mode/julia/), [shell](https://codemirror.net/5/mode/shell/), and [r](https://codemirror.net/5/mode/r/) modes.
[clojure mode](https://codemirror.net/5/mode/clojure/index.html): Clean up and improve.
## 5.40.0 (2018-08-25)
### Bug fixes
[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Fix issue where bracket-closing wouldn't work before punctuation.
[panel addon](https://codemirror.net/5/doc/manual.html#addon_panel): Fix problem where replacing the last remaining panel dropped the newly added panel.
[hardwrap addon](https://codemirror.net/5/doc/manual.html#addon_hardwrap): Fix an infinite loop when the indentation is greater than the target column.
[jinja2](https://codemirror.net/5/mode/jinja2/) and [markdown](https://codemirror.net/5/mode/markdown/) modes: Add comment metadata.
### New features
New method [`phrase`](https://codemirror.net/5/doc/manual.html#phrase) and option [`phrases`](https://codemirror.net/5/doc/manual.html#option_phrases) to make translating UI text in addons easier.
## 5.39.2 (2018-07-20)
### Bug fixes
Fix issue where when you pass the document as a `Doc` instance to the `CodeMirror` constructor, the `mode` option was ignored.
Fix bug where line height could be computed wrong with a line widget below a collapsed line.
Fix overeager `.npmignore` dropping the `bin/source-highlight` utility from the distribution.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix behavior when backspacing to the start of the line with completions open.
## 5.39.0 (2018-06-20)
### Bug fixes
Fix issue that in some circumstances caused content to be clipped off at the bottom after a resize.
[markdown mode](https://codemirror.net/5/mode/markdown/): Improve handling of blank lines in HTML tags.
### New features
[stex mode](https://codemirror.net/5/mode/stex/): Add an `inMathMode` option to start the mode in math mode.
## 5.38.0 (2018-05-21)
### Bug fixes
Improve reliability of noticing a missing mouseup event during dragging.
Make sure `getSelection` is always called on the correct document.
Fix interpretation of line breaks and non-breaking spaces inserted by renderer in contentEditable mode.
Work around some browsers inexplicably making the fake scrollbars focusable.
Make sure `coordsChar` doesn't return positions inside collapsed ranges.
[javascript mode](https://codemirror.net/5/mode/javascript/): Support block scopes, bindingless catch, bignum suffix, `s` regexp flag.
[markdown mode](https://codemirror.net/5/mode/markdown/): Adjust a wasteful regexp.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Allow opening the control without any item selected.
### New features
New theme: [darcula](https://codemirror.net/5/demo/theme.html#darcula).
[dialog addon](https://codemirror.net/5/doc/manual.html#addon_dialog): Add a CSS class (`dialog-opened`) to the editor when a dialog is open.
## 5.37.0 (2018-04-20)
### Bug fixes
Suppress keypress events during composition, for platforms that don't properly do this themselves.
[xml-fold addon](https://codemirror.net/5/demo/folding.html): Improve handling of line-wrapped opening tags.
[javascript mode](https://codemirror.net/5/mode/javascript/): Improve TypeScript support.
[python mode](https://codemirror.net/5/mode/python/): Highlight expressions inside format strings.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Add support for '(' and ')' movement.
New themes: [idea](https://codemirror.net/5/demo/theme.html#idea), [ssms](https://codemirror.net/5/demo/theme.html#ssms), [gruvbox-dark](https://codemirror.net/5/demo/theme.html#gruvbox-dark).
## 5.36.0 (2018-03-20)
### Bug fixes
Make sure all document-level event handlers are registered on the document that the editor is part of.
Fix issue that prevented edits whose origin starts with `+` from being combined in history events for an editor-less document.
[multiplex addon](https://codemirror.net/5/demo/multiplex.html): Improve handling of indentation.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Use CSS `:after` element to style the scroll-lock icon.
[javascript-hint addon](https://codemirror.net/5/doc/manual.html#addon_javascript-hint): Don't provide completions in JSON mode.
[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Fix numbering error.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Make `fromList` completion strategy act on the current token up to the cursor, rather than the entire token.
[markdown mode](https://codemirror.net/5/mode/markdown/): Fix a regexp with potentially exponental complexity.
### New features
New theme: [lucario](https://codemirror.net/5/demo/theme.html#lucario).
## 5.35.0 (2018-02-20)
### Bug fixes
Fix problem where selection undo might change read-only documents.
Fix crash when calling `addLineWidget` on a document that has no attached editor.
[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Fix behavior of `^` in multiline regexp mode.
[match-highlighter addon](https://codemirror.net/5/doc/manual.html#addon_match-highlighter): Fix problem with matching words that have regexp special syntax in them.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Fix `addCursorToSelection` for short lines.
[javascript mode](https://codemirror.net/5/mode/javascript/): Support TypeScript intersection types, dynamic `import`.
[stex mode](https://codemirror.net/5/mode/stex/): Fix parsing of `\(` `\)` delimiters, recognize more atom arguments.
[haskell mode](https://codemirror.net/5/mode/haskell/): Highlight more builtins, support `<*` and `*>`.
[sql mode](https://codemirror.net/5/mode/sql/): Make it possible to disable backslash escapes in strings for dialects that don't have them, do this for MS SQL.
[dockerfile mode](https://codemirror.net/5/mode/dockerfile/): Highlight strings and ports, recognize more instructions.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Support alternative delimiters in replace command.
## 5.34.0 (2018-01-29)
### Bug fixes
[markdown mode](https://codemirror.net/5/mode/markdown/): Fix a problem where inline styles would persist across list items.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Fix the `toggleBookmark` command.
[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Improve behavior when closing triple quotes.
[xml-fold addon](https://codemirror.net/5/demo/folding.html): Fix folding of line-broken XML tags.
[shell mode](https://codemirror.net/5/mode/shell/): Better handling of nested quoting.
[javascript-lint addon](https://codemirror.net/5/demo/lint.html): Clean up and simplify.
[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Fix support for multiple editors at the same time.
### New features
New themes: [oceanic-next](https://codemirror.net/5/demo/theme.html#oceanic-next) and [shadowfox](https://codemirror.net/5/demo/theme.html#shadowfox).
## 5.33.0 (2017-12-21)
### Bug fixes
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Make updates more efficient.
[css mode](https://codemirror.net/5/mode/css/): The mode is now properly case-insensitive.
[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Fix broken handling of unordered lists introduced in previous release.
[swift](https://codemirror.net/5/mode/swift) and [scala](https://codemirror.net/5/mode/clike/) modes: Support nested block comments.
[mllike mode](https://codemirror.net/5/mode/mllike/index.html): Improve OCaml support.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Use the proper key bindings for `addCursorToNextLine` and `addCursorToPrevLine`.
### New features
[jsx mode](https://codemirror.net/5/mode/jsx/index.html): Support JSX fragments.
[closetag addon](https://codemirror.net/5/demo/closetag.html): Add an option to disable auto-indenting.
## 5.32.0 (2017-11-22)
### Bug fixes
Increase contrast on default bracket-matching colors.
[javascript mode](https://codemirror.net/5/mode/javascript/): Recognize TypeScript type parameters for calls, type guards, and type parameter defaults. Improve handling of `enum` and `module` keywords.
[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Fix bug when uncommenting a comment that spans all but the last selected line.
[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Fix bug in case folding.
[emacs bindings](https://codemirror.net/5/demo/emacs.html): Prevent single-character deletions from resetting the kill ring.
[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Tweak quote matching behavior.
### New features
[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Increment ordered list numbers when adding one.
## 5.31.0 (2017-10-20)
### Bug fixes
Further improve selection drawing and cursor motion in right-to-left documents.
[vim bindings](https://codemirror.net/5/demo/vim.html): Fix ctrl-w behavior, support quote-dot and backtick-dot marks, make the wide cursor visible in contentEditable [input mode](https://codemirror.net/5/doc/manual.html#option_contentEditable).
[continuecomment addon](https://codemirror.net/5/doc/manual.html#addon_continuecomment): Fix bug when pressing enter after a single-line block comment.
[markdown mode](https://codemirror.net/5/mode/markdown/): Fix issue with leaving indented fenced code blocks.
[javascript mode](https://codemirror.net/5/mode/javascript/): Fix bad parsing of operators without spaces between them. Fix some corner cases around semicolon insertion and regexps.
### New features
Modes added with [`addOverlay`](https://codemirror.net/5/doc/manual.html#addOverlay) now have access to a [`baseToken`](https://codemirror.net/5/doc/manual.html#baseToken) method on their input stream, giving access to the tokens of the underlying mode.
## 5.30.0 (2017-09-20)
### Bug fixes
Fixed a number of issues with drawing right-to-left selections and mouse selection in bidirectional text.
[search addon](https://codemirror.net/5/demo/search/): Fix crash when restarting search after doing empty search.
[mark-selection addon](http://cm/doc/manual.html#addon_mark-selection): Fix off-by-one bug.
[tern addon](https://codemirror.net/5/demo/tern.html): Fix bad request made when editing at the bottom of a large document.
[javascript mode](https://codemirror.net/5/mode/javascript/): Improve parsing in a number of corner cases.
[markdown mode](https://codemirror.net/5/mode/markdown/): Fix crash when a sub-mode doesn't support indentation, allow uppercase X in task lists.
[gfm mode](https://codemirror.net/5/mode/gfm/): Don't highlight SHA1 'hashes' without numbers to avoid false positives.
[soy mode](https://codemirror.net/5/mode/soy/): Support injected data and `@param` in comments.
### New features
[simple mode addon](https://codemirror.net/5/demo/simplemode.html): Allow groups in regexps when `token` isn't an array.
## 5.29.0 (2017-08-24)
### Bug fixes
Fix crash in contentEditable input style when editing near a bookmark.
Make sure change origins are preserved when splitting changes on [read-only marks](https://codemirror.net/5/doc/manual.html#mark_readOnly).
[javascript mode](https://codemirror.net/5/mode/javascript/): More support for TypeScript syntax.
[d mode](https://codemirror.net/5/mode/d/): Support nested comments.
[python mode](https://codemirror.net/5/mode/python/): Improve tokenizing of operators.
[markdown mode](https://codemirror.net/5/mode/markdown/): Further improve CommonMark conformance.
[css mode](https://codemirror.net/5/mode/css/): Don't run comment tokens through the mode's state machine.
[shell mode](https://codemirror.net/5/mode/shell/): Allow strings to span lines.
[search addon](https://codemirror.net/5/demo/search/): Fix crash in persistent search when `extraKeys` is null.
## 5.28.0 (2017-07-21)
### Bug fixes
Fix copying of, or replacing editor content with, a single dash character when copying a big selection in some corner cases.
Make [`"goLineLeft"`](https://codemirror.net/5/doc/manual.html#command_goLineLeft)/`"goLineRight"` behave better on wrapped lines.
[sql mode](https://codemirror.net/5/mode/sql/): Fix tokenizing of multi-dot operator and allow digits in subfield names.
[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Fix infinite loop on some composed character inputs.
[markdown mode](https://codemirror.net/5/mode/markdown/): Make list parsing more CommonMark-compliant.
[gfm mode](https://codemirror.net/5/mode/gfm/): Highlight colon syntax for emoji.
### New features
Expose [`startOperation`](https://codemirror.net/5/doc/manual.html#startOperation) and `endOperation` for explicit operation management.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Add extend-selection (Ctrl-Alt- or Cmd-Shift-Up/Down).
## 5.27.4 (2017-06-29)
### Bug fixes
Fix crash when using mode lookahead.
[markdown mode](https://codemirror.net/5/mode/markdown/): Don't block inner mode's indentation support.
## 5.27.2 (2017-06-22)
### Bug fixes
Fix crash in the [simple mode](https://codemirror.net/5/demo/simplemode.html)< addon.
## 5.27.0 (2017-06-22)
### Bug fixes
Fix infinite loop in forced display update.
Properly disable the hidden textarea when `readOnly` is `"nocursor"`.
Calling the `Doc` constructor without `new` works again.
[sql mode](https://codemirror.net/5/mode/sql/): Handle nested comments.
[javascript mode](https://codemirror.net/5/mode/javascript/): Improve support for TypeScript syntax.
[markdown mode](https://codemirror.net/5/mode/markdown/): Fix bug where markup was ignored on indented paragraph lines.
[vim bindings](https://codemirror.net/5/demo/vim.html): Referencing invalid registers no longer causes an uncaught exception.
[rust mode](https://codemirror.net/5/mode/rust/): Add the correct MIME type.
[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Document options.
### New features
Mouse button clicks can now be bound in keymaps by using names like `"LeftClick"` or `"Ctrl-Alt-MiddleTripleClick"`. When bound to a function, that function will be passed the position of the click as second argument.
The behavior of mouse selection and dragging can now be customized with the [`configureMouse`](https://codemirror.net/5/doc/manual.html#option_configureMouse) option.
Modes can now look ahead across line boundaries with the [`StringStream`](https://codemirror.net/5/doc/manual.html#StringStream)`.lookahead` method.
Introduces a `"type"` token type, makes modes that recognize types output it, and add styling for it to the themes.
New [`pasteLinesPerSelection`](https://codemirror.net/5/doc/manual.html#option_pasteLinesPerSelection) option to control the behavior of pasting multiple lines into multiple selections.
[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Support multi-line regular expression matches, and normalize strings when matching.
## 5.26.0 (2017-05-22)
### Bug fixes
In textarea-mode, don't reset the input field during composition.
More careful restoration of selections in widgets, during editor redraw.
[javascript mode](https://codemirror.net/5/mode/javascript/): More TypeScript parsing fixes.
[julia mode](https://codemirror.net/5/mode/julia/): Fix issue where the mode gets stuck.
[markdown mode](https://codemirror.net/5/mode/markdown/): Understand cross-line links, parse all bracketed things as links.
[soy mode](https://codemirror.net/5/mode/soy/): Support single-quoted strings.
[go mode](https://codemirror.net/5/mode/go/): Don't try to indent inside strings or comments.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Parse line offsets in line or range specs.
## 5.25.2 (2017-04-20)
### Bug fixes
Better handling of selections that cover the whole viewport in contentEditable-mode.
No longer accidentally scroll the editor into view when calling `setValue`.
Work around Chrome Android bug when converting screen coordinates to editor positions.
Make sure long-clicking a selection sets a cursor and doesn't show the editor losing focus.
Fix issue where pointer events were incorrectly disabled on Chrome's overlay scrollbars.
[javascript mode](https://codemirror.net/5/mode/javascript/): Recognize annotations and TypeScript-style type parameters.
[shell mode](https://codemirror.net/5/mode/shell/): Handle nested braces.
[markdown mode](https://codemirror.net/5/mode/markdown/): Make parsing of strong/em delimiters CommonMark-compliant.
## 5.25.0 (2017-03-20)
### Bug fixes
In contentEditable-mode, properly locate changes that repeat a character when inserted with IME.
Fix handling of selections bigger than the viewport in contentEditable mode.
Improve handling of changes that insert or delete lines in contentEditable mode.
Count Unicode control characters 0x80 to 0x9F as special (non-printing) chars.
Fix handling of shadow DOM roots when finding the active element.
Add `role=presentation` to more DOM elements to improve screen reader support.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Make aligning of unchanged chunks more robust.
[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Fix comment-toggling on a block of text that starts and ends in a (different) block comment.
[javascript mode](https://codemirror.net/5/mode/javascript/): Improve support for TypeScript syntax.
[r mode](https://codemirror.net/5/mode/r/): Fix indentation after semicolon-less statements.
[shell mode](https://codemirror.net/5/mode/shell/): Properly handle escaped parentheses in parenthesized expressions.
[markdown mode](https://codemirror.net/5/mode/markdown/): Fix a few bugs around leaving fenced code blocks.
[soy mode](https://codemirror.net/5/mode/soy/): Improve indentation.
### New features
[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Support asynchronous linters that return promises.
[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Support continuing task lists.
[vim bindings](https://codemirror.net/5/demo/vim.html): Make Y behave like yy.
[sql mode](https://codemirror.net/5/mode/sql/): Support sqlite dialect.
## 5.24.2 (2017-02-22)
### Bug fixes
[javascript mode](https://codemirror.net/5/mode/javascript/): Support computed class method names.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Improve aligning of unchanged code in the presence of marks and line widgets.
## 5.24.0 (2017-02-20)
### Bug fixes
A cursor directly before a line-wrapping break is now drawn before or after the line break depending on which direction you arrived from.
Visual cursor motion in line-wrapped right-to-left text should be much more correct.
Fix bug in handling of read-only marked text.
[shell mode](https://codemirror.net/5/mode/shell/): Properly tokenize nested parentheses.
[python mode](https://codemirror.net/5/mode/python/): Support underscores in number literals.
[sass mode](https://codemirror.net/5/mode/sass/): Uses the full list of CSS properties and keywords from the CSS mode, rather than defining its own incomplete subset.
[css mode](https://codemirror.net/5/mode/css/): Expose `lineComment` property for LESS and SCSS dialects. Recognize vendor prefixes on pseudo-elements.
[julia mode](https://codemirror.net/5/mode/julia/): Properly indent `elseif` lines.
[markdown mode](https://codemirror.net/5/mode/markdown/): Properly recognize the end of fenced code blocks when inside other markup.
[scala mode](https://codemirror.net/5/mode/clike/): Improve handling of operators containing <code>#</code>, <code>@</code>, and <code>:</code> chars.
[xml mode](https://codemirror.net/5/mode/xml/): Allow dashes in HTML tag names.
[javascript mode](https://codemirror.net/5/mode/javascript/): Improve parsing of async methods, TypeScript-style comma-separated superclass lists.
[indent-fold addon](https://codemirror.net/5/demo/folding.html): Ignore comment lines.
### New features
Positions now support a `sticky` property which determines whether they should be associated with the character before (value `"before"`) or after (value `"after"`) them.
[vim bindings](https://codemirror.net/5/demo/vim.html): Make it possible to remove built-in bindings through the API.
[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Support a per-mode <code>useInnerComments</code> option to optionally suppress descending to the inner modes to get comment strings.
### Breaking changes
The [sass mode](https://codemirror.net/5/mode/sass/) now depends on the [css mode](https://codemirror.net/5/mode/css/).
## 5.23.0 (2017-01-19)
### Bug fixes
Presentation-related elements DOM elements are now marked as such to help screen readers.
[markdown mode](https://codemirror.net/5/mode/markdown/): Be more picky about what HTML tags look like to avoid false positives.
### New features
`findModeByMIME` now understands `+json` and `+xml` MIME suffixes.
[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Add support for an `override` option to ignore language-specific defaults.
[panel addon](https://codemirror.net/5/doc/manual.html#addon_panel): Add a `stable` option that auto-scrolls the content to keep it in the same place when inserting/removing a panel.
## 5.22.2 (2017-01-12)
### Bug fixes
Include rollup.config.js in NPM package, so that it can be used to build from source.
## 5.22.0 (2016-12-20)
### Bug fixes
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Make `selectBetweenBrackets` work with multiple cursors.
[javascript mode](https://codemirror.net/5/mode/javascript/): Fix issues with parsing complex TypeScript types, imports, and exports.
A contentEditable editor instance with autofocus enabled no longer crashes during initializing.
### New features
[emacs bindings](https://codemirror.net/5/demo/emacs.html): Export `CodeMirror.emacs` to allow other addons to hook into Emacs-style functionality.
[active-line addon](https://codemirror.net/5/doc/manual.html#addon_active-line): Add `nonEmpty` option.
New event: [`optionChange`](https://codemirror.net/5/doc/manual.html#event_optionChange).
## 5.21.0 (2016-11-21)
### Bug fixes
Tapping/clicking the editor in [contentEditable mode](https://codemirror.net/5/doc/manual.html#option_inputStyle) on Chrome now puts the cursor at the tapped position.
Fix various crashes and misbehavior when reading composition events in [contentEditable mode](https://codemirror.net/5/doc/manual.html#option_inputStyle).
Catches and ignores an IE 'Unspecified Error' when creating an editor in an iframe before there is a `<body>`.
[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Fix several issues in the chunk-aligning feature.
[verilog mode](https://codemirror.net/5/mode/verilog): Rewritten to address various issues.
[julia mode](https://codemirror.net/5/mode/julia): Recognize Julia 0.5 syntax.
[swift mode](https://codemirror.net/5/mode/swift): Various fixes and adjustments to current syntax.
[markdown mode](https://codemirror.net/5/mode/markdown): Allow lists without a blank line above them.
### New features
The [`setGutterMarker`](https://codemirror.net/5/doc/manual.html#setGutterMarker), [`clearGutter`](https://codemirror.net/5/doc/manual.html#clearGutter), and [`lineInfo`](https://codemirror.net/5/doc/manual.html#lineInfo) methods are now available on `Doc` objects.
The [`heightAtLine`](https://codemirror.net/5/doc/manual.html#heightAtLine) method now takes an extra argument to allow finding the height at the top of the line's line widgets.
[ruby mode](https://codemirror.net/5/mode/ruby): `else` and `elsif` are now immediately indented.
[vim bindings](https://codemirror.net/5/demo/vim.html): Bind Ctrl-T and Ctrl-D to in- and dedent in insert mode.
## 5.20.2 (2016-10-21)
### Bug fixes
Fix `CodeMirror.version` returning the wrong version number.
## 5.20.0 (2016-10-20)
### Bug fixes
Make `newlineAndIndent` command work with multiple cursors on the same line.
Make sure keypress events for backspace are ignored.
Tokens styled with overlays no longer get a nonsense `cm-cm-overlay` class.
Line endings for pasted content are now normalized to the editor's [preferred ending](https://codemirror.net/5/doc/manual.html#option_lineSeparator).
[javascript mode](https://codemirror.net/5/mode/javascript): Improve support for class expressions. Support TypeScript optional class properties, the `abstract` keyword, and return type declarations for arrow functions.
[css mode](https://codemirror.net/5/mode/css): Fix highlighting of mixed-case keywords.
[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Improve behavior when typing a quote before a string.
### New features
The core is now maintained as a number of small files, using ES6 syntax and modules, under the `src/` directory. A git checkout no longer contains a working `codemirror.js` until you `npm run build` (but when installing from NPM, it is included).
The [`refresh`](https://codemirror.net/5/doc/manual.html#event_refresh) event is now documented and stable.
## 5.19.0 (2016-09-20)
### Bugfixes
[erlang mode](https://codemirror.net/5/mode/erlang): Fix mode crash when trying to read an empty context.
[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Fix broken behavior when toggling comments inside a comment.
xml-fold addon: Fix a null-dereference bug.
Page up and page down now do something even in single-line documents.
Fix an issue where the cursor position could be off in really long (~8000 character) tokens.
### New features
[javascript mode](https://codemirror.net/5/mode/javascript): Better indentation when semicolons are missing. Better support for TypeScript classes, optional parameters, and the `type` keyword.
The [`blur`](https://codemirror.net/5/doc/manual.html#event_blur) and [`focus`](https://codemirror.net/5/doc/manual.html#event_focus) events now pass the DOM event to their handlers.
## 5.18.2 (2016-08-23)
### Bugfixes
[vue mode](https://codemirror.net/5/mode/vue): Fix outdated references to renamed Pug mode dependency.
## 5.18.0 (2016-08-22)
### Bugfixes
Make sure [gutter backgrounds](https://codemirror.net/5/doc/manual.html#addLineClass) stick to the rest of the gutter during horizontal scrolling.
The contenteditable [`inputStyle`](https://codemirror.net/5/doc/manual.html#option_inputStyle) now properly supports pasting on pre-Edge IE versions.
[javascript mode](https://codemirror.net/5/mode/javascript): Fix some small parsing bugs and improve TypeScript support.
[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Fix bug where active highlighting was left in editor when the addon was disabled.
[match-highlighter addon](https://codemirror.net/5/doc/manual.html#addon_match-highlighter): Only start highlighting things when the editor gains focus.
[javascript-hint addon](https://codemirror.net/5/doc/manual.html#addon_javascript-hint): Also complete non-enumerable properties.
### New features
The [`addOverlay`](https://codemirror.net/5/doc/manual.html#addOverlay) method now supports a `priority` option to control the order in which overlays are applied.
MIME types that end in `+json` now default to the JSON mode when the MIME itself is not defined.
### Breaking changes
The mode formerly known as Jade was renamed to [Pug](https://codemirror.net/5/mode/pug).
The [Python mode](https://codemirror.net/5/mode/python) now defaults to Python 3 (rather than 2) syntax.
## 5.17.0 (2016-07-19)
### Bugfixes
Fix problem with wrapped trailing whitespace displaying incorrectly.
Prevent IME dialog from overlapping typed content in Chrome.
Improve measuring of characters near a line wrap.
[javascript mode](https://codemirror.net/5/mode/javascript): Improve support for `async`, allow trailing commas in `import` lists.
[vim bindings](https://codemirror.net/5/demo/vim.html): Fix backspace in replace mode.
[sublime bindings](https://codemirror.net/5/demo/sublime.html): Fix some key bindings on OS X to match Sublime Text.
### New features
[markdown mode](https://codemirror.net/5/mode/markdown): Add more classes to image links in highlight-formatting mode.
## 5.16.0 (2016-06-20)
### Bugfixes
Fix glitches when dragging content caused by the drop indicator receiving mouse events.
Make Control-drag work on Firefox.
Make clicking or selection-dragging at the end of a wrapped line select the right position.
[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Prevent widget scrollbar from hiding part of the hint text.
[rulers addon](https://codemirror.net/5/doc/manual.html#addon_rulers): Prevent rulers from forcing a horizontal editor scrollbar.
### New features
[search addon](https://codemirror.net/5/doc/manual.html#addon_search): Automatically bind search-related keys in persistent dialog.
[sublime keymap](https://codemirror.net/5/demo/sublime.html): Add a multi-cursor aware smart backspace binding.
## 5.15.2 (2016-05-20)
### Bugfixes
Fix a critical document corruption bug that occurs when a document is gradually grown.
## 5.15.0 (2016-05-20)
### Bugfixes
Fix bug that caused the selection to reset when focusing the editor in contentEditable input mode.
Fix issue where not all ASCII control characters were being replaced by placeholders.
Remove the assumption that all modes have a `startState` method from several wrapping modes.
Fix issue where the editor would complain about overlapping collapsed ranges when there weren't any.
Optimize document tree building when loading or pasting huge chunks of content.
[markdown mode](https://codemirror.net/5/mode/markdown/): Fix several issues in matching link targets.
[clike mode](https://codemirror.net/5/mode/clike/): Improve indentation of C++ template declarations.
### New features
Explicitly bind Ctrl-O on OS X to make that binding (“open line”) act as expected.
Pasting [linewise-copied](https://codemirror.net/5/doc/manual.html#option_lineWiseCopyCut) content when there is no selection now inserts the lines above the current line.
[javascript mode](https://codemirror.net/5/mode/javascript/): Support `async`/`await` and improve support for TypeScript type syntax.
## 5.14.2 (2016-04-20)
### Bugfixes
Push a new package to NPM due to an [NPM bug](https://github.com/npm/npm/issues/5082) omitting the LICENSE file in 5.14.0.
Set `dataTransfer.effectAllowed` in `dragstart` handler to help browsers use the right drag icon.
Add the [mbox mode](https://codemirror.net/5/mode/mbox/index.html) to `mode/meta.js`.
## 5.14.0 (2016-04-20)
### Bugfixes
[`posFromIndex`](https://codemirror.net/5/doc/manual.html#posFromIndex) and [`indexFromPos`](https://codemirror.net/5/doc/manual.html#indexFromPos) now take [`lineSeparator`](https://codemirror.net/5/doc/manual.html#option_lineSeparator) into account.
[vim bindings](https://codemirror.net/5/demo/vim.html): Only call `.save()` when it is actually available.
[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Be careful not to mangle multi-line strings.
[Python mode](https://codemirror.net/5/mode/python/index.html): Improve distinguishing of decorators from `@` operators.
[`findMarks`](https://codemirror.net/5/doc/manual.html#findMarks): No longer return marks that touch but don't overlap given range.
### New features
[vim bindings](https://codemirror.net/5/demo/vim.html): Add yank command.
[match-highlighter addon](https://codemirror.net/5/doc/manual.html#addon_match-highlighter): Add `trim` option to disable ignoring of whitespace.
[PowerShell mode](https://codemirror.net/5/mode/powershell/index.html): Added.
[Yacas mode](https://codemirror.net/5/mode/yacas/index.html): Added.
[Web IDL mode](https://codemirror.net/5/mode/webidl/index.html): Added.
[SAS mode](https://codemirror.net/5/mode/sas/index.html): Added.
[mbox mode](https://codemirror.net/5/mode/mbox/index.html): Added.
## 5.13.2 (2016-03-23)
### Bugfixes
Solves a problem where the gutter would sometimes not extend all the way to the end of the document.
## 5.13.0 (2016-03-21)
### New features
New DOM event forwarded: [`"dragleave"`](https://codemirror.net/5/doc/manual.html#event_dom).
[protobuf mode](https://codemirror.net/5/mode/protobuf/index.html): Newly added.
### Bugfixes
Fix problem where [`findMarks`](https://codemirror.net/5/doc/manual.html#findMarks) sometimes failed to find multi-line marks.
Fix crash that showed up when atomic ranges and bidi text were combined.
[show-hint addon](https://codemirror.net/5/demo/complete.html): Completion widgets no longer close when the line indented or dedented.
[merge addon](https://codemirror.net/5/demo/merge.html): Fix bug when merging chunks at the end of the file.
[placeholder addon](https://codemirror.net/5/doc/manual.html#addon_placeholder): No longer gets confused by [`swapDoc`](https://codemirror.net/5/doc/manual.html#swapDoc).
[simplescrollbars addon](https://codemirror.net/5/doc/manual.html#addon_simplescrollbars): Fix invalid state when deleting at end of document.
[clike mode](https://codemirror.net/5/mode/clike/index.html): No longer gets confused when a comment starts after an operator.
[markdown mode](https://codemirror.net/5/mode/markdown/index.html): Now supports CommonMark-style flexible list indentation.
[dylan mode](https://codemirror.net/5/mode/dylan/index.html): Several improvements and fixes.
## 5.12.0 (2016-02-19)
### New features
[Vim bindings](https://codemirror.net/5/demo/vim.html): Ctrl-Q is now an alias for Ctrl-V.
[Vim bindings](https://codemirror.net/5/demo/vim.html): The Vim API now exposes an `unmap` method to unmap bindings.
[active-line addon](https://codemirror.net/5/demo/activeline.html): This addon can now style the active line's gutter.
[FCL mode](https://codemirror.net/5/mode/fcl/): Newly added.
[SQL mode](https://codemirror.net/5/mode/sql/): Now has a Postgresql dialect.
### Bugfixes
Fix [issue](https://github.com/codemirror/CodeMirror/issues/3781) where trying to scroll to a horizontal position outside of the document's width could cause the gutter to be positioned incorrectly.
Use absolute, rather than fixed positioning in the context-menu intercept hack, to work around a [problem](https://github.com/codemirror/CodeMirror/issues/3238) when the editor is inside a transformed parent container.
Solve a [problem](https://github.com/codemirror/CodeMirror/issues/3821) where the horizontal scrollbar could hide text in Firefox.
Fix a [bug](https://github.com/codemirror/CodeMirror/issues/3834) that caused phantom scroll space under the text in some situations.
[Sublime Text bindings](https://codemirror.net/5/demo/sublime.html): Bind delete-line to Shift-Ctrl-K on OS X.
[Markdown mode](https://codemirror.net/5/mode/markdown/): Fix [issue](https://github.com/codemirror/CodeMirror/issues/3787) where the mode would keep state related to fenced code blocks in an unsafe way, leading to occasional corrupted parses.
[Markdown mode](https://codemirror.net/5/mode/markdown/): Ignore backslashes in code fragments.
[Markdown mode](https://codemirror.net/5/mode/markdown/): Use whichever mode is registered as `text/html` to parse HTML.
[Clike mode](https://codemirror.net/5/mode/clike/): Improve indentation of Scala `=>` functions.
[Python mode](https://codemirror.net/5/mode/python/): Improve indentation of bracketed code.
[HTMLMixed mode](https://codemirror.net/5/mode/htmlmixed/): Support multi-line opening tags for sub-languages (`<script>`, `<style>`, etc).
[Spreadsheet mode](https://codemirror.net/5/mode/spreadsheet/): Fix bug where the mode did not advance the stream when finding a backslash.
[XML mode](https://codemirror.net/5/mode/xml/): The mode now takes a `matchClosing` option to configure whether mismatched closing tags should be highlighted as errors.
## 5.11.0 (2016-01-20)
* New modes: [JSX](https://codemirror.net/5/mode/jsx/index.html), [literate Haskell](https://codemirror.net/5/mode/haskell-literate/index.html)
* The editor now forwards more [DOM events](https://codemirror.net/5/doc/manual.html#event_dom): `cut`, `copy`, `paste`, and `touchstart`. It will also forward `mousedown` for drag events
* Fixes a bug where bookmarks next to collapsed spans were not rendered
* The [Swift](https://codemirror.net/5/mode/swift/index.html) mode now supports auto-indentation
* Frontmatters in the [YAML frontmatter](https://codemirror.net/5/mode/yaml-frontmatter/index.html) mode are now optional as intended
## 5.10.0 (2015-12-21)
* Modify the way [atomic ranges](https://codemirror.net/5/doc/manual.html#mark_atomic) are skipped by selection to try and make it less surprising.
* The [Swift mode](https://codemirror.net/5/mode/swift/index.html) was rewritten.
* New addon: [jump-to-line](https://codemirror.net/5/doc/manual.html#addon_jump-to-line).
* New method: [`isReadOnly`](https://codemirror.net/5/doc/manual.html#isReadOnly).
* The [show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint) now defaults to picking completions on single click.
* The object passed to [`"beforeSelectionChange"`](https://codemirror.net/5/doc/manual.html#event_beforeSelectionChange) events now has an `origin` property.
* New mode: [Crystal](https://codemirror.net/5/mode/crystal/index.html).
## 5.9.0 (2015-11-23)
* Improve the way overlay (OS X-style) scrollbars are handled
* Make [annotatescrollbar](https://codemirror.net/5/doc/manual.html#addon_annotatescrollbar) and scrollpastend addons work properly together
* Make [show-hint](https://codemirror.net/5/doc/manual.html#addon_show-hint) addon select options on single click by default, move selection to hovered item
* Properly fold comments that include block-comment-start markers
* Many small language mode fixes
## 5.8.0 (2015-10-20)
* Fixes an infinite loop in the [hardwrap addon](https://codemirror.net/5/doc/manual.html#addon_hardwrap)
* New modes: [NSIS](https://codemirror.net/5/mode/nsis/index.html), [Ceylon](https://codemirror.net/5/mode/clike/index.html)
* The Kotlin mode is now a [clike](https://codemirror.net/5/mode/clike/index.html) dialect, rather than a stand-alone mode
* New option: [`allowDropFileTypes`](https://codemirror.net/5/doc/manual.html#option_allowDropFileTypes). Binary files can no longer be dropped into CodeMirror
* New themes: [bespin](https://codemirror.net/5/demo/theme.html#bespin), [hopscotch](https://codemirror.net/5/demo/theme.html#hopscotch), [isotope](https://codemirror.net/5/demo/theme.html#isotope), [railscasts](https://codemirror.net/5/demo/theme.html#railscasts)
## 5.7.0 (2015-09-21)
* New modes: [Vue](https://codemirror.net/5/mode/vue/index.html), [Oz](https://codemirror.net/5/mode/oz/index.html), [MscGen](https://codemirror.net/5/mode/mscgen/index.html) (and dialects), [Closure Stylesheets](https://codemirror.net/5/mode/css/gss.html)
* Implement [CommonMark](http://commonmark.org)-style flexible list indent and cross-line code spans in [Markdown](https://codemirror.net/5/mode/markdown/index.html) mode
* Add a replace-all button to the [search addon](https://codemirror.net/5/doc/manual.html#addon_search), and make the persistent search dialog transparent when it obscures the match
* Handle `async`/`await` and ocal and binary numbers in [JavaScript mode](https://codemirror.net/5/mode/javascript/index.html)
* Fix various issues with the [Haxe mode](https://codemirror.net/5/mode/haxe/index.html)
* Make the [closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets) select only the wrapped text when wrapping selection in brackets
* Tokenize properties as properties in the [CoffeeScript mode](https://codemirror.net/5/mode/coffeescript/index.html)
* The [placeholder addon](https://codemirror.net/5/doc/manual.html#addon_placeholder) now accepts a DOM node as well as a string placeholder
## 5.6.0 (2015-08-20)
* Fix bug where you could paste into a `readOnly` editor
* Show a cursor at the drop location when dragging over the editor
* The [Rust mode](https://codemirror.net/5/mode/rust/index.html) was rewritten to handle modern Rust
* The editor and theme CSS was cleaned up. Some selectors are now less specific than before
* New theme: [abcdef](https://codemirror.net/5/demo/theme.html#abcdef)
* Lines longer than [`maxHighlightLength`](https://codemirror.net/5/doc/manual.html#option_maxHighlightLength) are now less likely to mess up indentation
* New addons: [`autorefresh`](https://codemirror.net/5/doc/manual.html#addon_autorefresh) for refreshing an editor the first time it becomes visible, and `html-lint` for using [HTMLHint](http://htmlhint.com/)
* The [`search`](https://codemirror.net/5/doc/manual.html#addon_search) addon now recognizes `\r` and `\n` in pattern and replacement input
## 5.5.0 (2015-07-20)
* New option: [`lineSeparator`](https://codemirror.net/5/doc/manual.html#option_lineSeparator) (with corresponding [method](https://codemirror.net/5/doc/manual.html#lineSeparator))
* New themes: [dracula](https://codemirror.net/5/demo/theme.html#dracula), [seti](https://codemirror.net/5/demo/theme.html#seti), [yeti](https://codemirror.net/5/demo/theme.html#yeti), [material](https://codemirror.net/5/demo/theme.html#material), and [icecoder](https://codemirror.net/5/demo/theme.html#icecoder)
* New modes: [Brainfuck](https://codemirror.net/5/mode/brainfuck/index.html), [VHDL](https://codemirror.net/5/mode/vhdl/index.html), Squirrel ([clike](https://codemirror.net/5/mode/clike/index.html) dialect)
* Define a `findPersistent` command in the [search](https://codemirror.net/5/demo/search.html) addon, for a dialog that stays open as you cycle through matches
* From this release on, the NPM module doesn't include documentation and demos
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/5.4.0...5.5.0)
## 5.4.0 (2015-06-25)
* New modes: [Twig](https://codemirror.net/5/mode/twig/index.html), [Elm](https://codemirror.net/5/mode/elm/index.html), [Factor](https://codemirror.net/5/mode/factor/index.html), [Swift](https://codemirror.net/5/mode/swift/index.html)
* Prefer clipboard API (if available) when pasting
* Refined definition highlighting in [clike](https://codemirror.net/5/mode/clike/index.html) mode
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/5.3.0...5.4.0)
## 5.3.0 (2015-05-20)
* Fix several regressions in the [`show-hint`](https://codemirror.net/5/doc/manual.html#addon_show-hint) addon (`completeSingle` option, `"shown"` and `"close"` events)
* The [vim mode](https://codemirror.net/5/demo/vim.html) API was [documented](https://codemirror.net/5/doc/manual.html#vimapi)
* New modes: [ASN.1](https://codemirror.net/5/mode/asn.1/index.html), [TTCN](https://codemirror.net/5/mode/ttcn/index.html), and [TTCN-CFG](https://codemirror.net/5/mode/ttcn-cfg/index.html)
* The [clike](https://codemirror.net/5/mode/clike/index.html) mode can now deep-indent `switch` statements, and roughly recognizes types and defined identifiers
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/5.2.0...5.3.0)
## 5.2.0 (2015-04-20)
* Fix several race conditions in [`show-hint`](https://codemirror.net/5/doc/manual.html#addon_show-hint)'s asynchronous mode
* Fix backspace binding in [Sublime bindings](https://codemirror.net/5/demo/sublime.html)
* Change the way IME is handled in the `"textarea"` [input style](https://codemirror.net/5/doc/manual.html#option_inputStyle)
* New modes: [MUMPS](https://codemirror.net/5/mode/mumps/index.html), [Handlebars](https://codemirror.net/5/mode/handlebars/index.html)
* Rewritten modes: [Django](https://codemirror.net/5/mode/django/index.html), [Z80](https://codemirror.net/5/mode/z80/index.html)
* New theme: [Liquibyte](https://codemirror.net/5/demo/theme.html#liquibyte)
* New option: [`lineWiseCopyCut`](https://codemirror.net/5/doc/manual.html#option_lineWiseCopyCut)
* The [Vim mode](https://codemirror.net/5/demo/vim.html) now supports buffer-local options and the `filetype` setting
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/5.1.0...5.2.0)
## 5.1.0 (2015-03-23)
* New modes: [ASCII armor](https://codemirror.net/5/mode/asciiarmor/index.html) (PGP data), [Troff](https://codemirror.net/5/mode/troff/index.html), and [CMake](https://codemirror.net/5/mode/cmake/index.html).
* Remove SmartyMixed mode, rewrite [Smarty](https://codemirror.net/5/mode/smarty/index.html) mode to supersede it.
* New commands in the [merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): `goNextDiff` and `goPrevDiff`.
* The [closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets) can now be configured per mode.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/5.0.0...5.1.0).
## 5.0.0 (2015-02-20)
* Experimental mobile support (tested on iOS, Android Chrome, stock Android browser)
* New option [`inputStyle`](https://codemirror.net/5/doc/manual.html#option_inputStyle) to switch between hidden textarea and contenteditable input.
* The [`getInputField`](https://codemirror.net/5/doc/manual.html#getInputField) method is no longer guaranteed to return a textarea.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.13.0...5.0.0).
## 4.13.0 (2015-02-20)
* Fix the way the [`closetag`](https://codemirror.net/5/demo/closetag.html) demo handles the slash character.
* New modes: [Forth](https://codemirror.net/5/mode/forth/index.html), [Stylus](https://codemirror.net/5/mode/stylus/index.html).
* Make the [CSS mode](https://codemirror.net/5/mode/css/index.html) understand some modern CSS extensions.
* Have the [Scala mode](https://codemirror.net/5/mode/clike/index.html) handle symbols and triple-quoted strings.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.12.0...4.13.0).
## 4.12.0 (2015-01-22)
* The [`closetag`](https://codemirror.net/5/doc/manual.html#addon_closetag) addon now defines a `"closeTag"` command.
* Adds a `findModeByFileName` to the [mode metadata](https://codemirror.net/5/doc/manual.html#addon_meta) addon.
* [Simple mode](https://codemirror.net/5/demo/simplemode.html) rules can now contain a `sol` property to only match at the start of a line.
* New addon: [`selection-pointer`](https://codemirror.net/5/doc/manual.html#addon_selection-pointer) to style the mouse cursor over the selection.
* Improvements to the [Sass mode](https://codemirror.net/5/mode/sass/index.html)'s indentation.
* The [Vim keymap](https://codemirror.net/5/demo/vim.html)'s search functionality now supports [scrollbar annotation](https://codemirror.net/5/doc/manual.html#addon_matchesonscrollbar).
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.11.0...4.12.0).
## 4.11.0 (2015-01-09)
Unfortunately, 4.10 did not take care of the Firefox scrolling issue entirely. This release adds two more patches to address that.
## 4.10.0 (2014-12-29)
Emergency single-patch update to 4.9\. Fixes Firefox-specific problem where the cursor could end up behind the horizontal scrollbar.
## 4.9.0 (2014-12-23)
* Overhauled scroll bar handling. Add pluggable [scrollbar implementations](https://codemirror.net/5/demo/simplescrollbars.html).
* Tweaked behavior for the [completion addons](https://codemirror.net/5/doc/manual.html#addon_show-hint) to not take text after cursor into account.
* Two new optional features in the [merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): aligning editors, and folding unchanged text.
* New modes: [Dart](https://codemirror.net/5/mode/dart/index.html), [EBNF](https://codemirror.net/5/mode/ebnf/index.html), [spreadsheet](https://codemirror.net/5/mode/spreadsheet/index.html), and [Soy](https://codemirror.net/5/mode/soy/index.html).
* New [addon](https://codemirror.net/5/demo/panel.html) to show persistent panels below/above an editor.
* New themes: [zenburn](https://codemirror.net/5/demo/theme.html#zenburn) and [tomorrow night bright](https://codemirror.net/5/demo/theme.html#tomorrow-night-bright).
* Allow ctrl-click to clear existing cursors.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.8.0...4.9.0).
## 4.8.0 (2014-11-22)
* Built-in support for [multi-stroke key bindings](https://codemirror.net/5/doc/manual.html#normalizeKeyMap).
* New method: [`getLineTokens`](https://codemirror.net/5/doc/manual.html#getLineTokens).
* New modes: [dockerfile](https://codemirror.net/5/mode/dockerfile/index.html), [IDL](https://codemirror.net/5/mode/idl/index.html), [Objective C](https://codemirror.net/5/mode/clike/index.html) (crude).
* Support styling of gutter backgrounds, allow `"gutter"` styles in [`addLineClass`](https://codemirror.net/5/doc/manual.html#addLineClass).
* Many improvements to the [Vim mode](https://codemirror.net/5/demo/vim.html), rewritten visual mode.
* Improvements to modes: [gfm](https://codemirror.net/5/mode/gfm/index.html) (strikethrough), [SPARQL](https://codemirror.net/5/mode/sparql/index.html) (version 1.1 support), and [sTeX](https://codemirror.net/5/mode/stex/index.html) (no more runaway math mode).
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.7.0...4.8.0).
## 4.7.0 (2014-10-20)
* **Incompatible**: The [lint addon](https://codemirror.net/5/demo/lint.html) now passes the editor's value as first argument to asynchronous lint functions, for consistency. The editor is still passed, as fourth argument.
* Improved handling of unicode identifiers in modes for languages that support them.
* More mode improvements: [CoffeeScript](https://codemirror.net/5/mode/coffeescript/index.html) (indentation), [Verilog](https://codemirror.net/5/mode/verilog/index.html) (indentation), [Scala](https://codemirror.net/5/mode/clike/index.html) (indentation, triple-quoted strings), and [PHP](https://codemirror.net/5/mode/php/index.html) (interpolated variables in heredoc strings).
* New modes: [Textile](https://codemirror.net/5/mode/textile/index.html) and [Tornado templates](https://codemirror.net/5/mode/tornado/index.html).
* Experimental new [way to define modes](https://codemirror.net/5/demo/simplemode.html).
* Improvements to the [Vim bindings](https://codemirror.net/5/demo/vim.html): Arbitrary insert mode key mappings are now possible, and text objects are supported in visual mode.
* The mode [meta-information file](https://codemirror.net/5/mode/meta.js) now includes information about file extensions, and [helper functions](https://codemirror.net/5/doc/manual.html#addon_meta) `findModeByMIME` and `findModeByExtension`.
* New logo!
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.6.0...4.7.0).
## 4.6.0 (2014-09-19)
* New mode: [Modelica](https://codemirror.net/5/mode/modelica/index.html)
* New method: [`findWordAt`](https://codemirror.net/5/doc/manual.html#findWordAt)
* Make it easier to [use text background styling](https://codemirror.net/5/demo/markselection.html)
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.5.0...4.6.0).
## 4.5.0 (2014-08-21)
* Fix several serious bugs with horizontal scrolling
* New mode: [Slim](https://codemirror.net/5/mode/slim/index.html)
* New command: [`goLineLeftSmart`](https://codemirror.net/5/doc/manual.html#command_goLineLeftSmart)
* More fixes and extensions for the [Vim](https://codemirror.net/5/demo/vim.html) visual block mode
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.4.0...4.5.0).
## 4.4.0 (2014-07-21)
* **Note:** Some events might now fire in slightly different order (`"change"` is still guaranteed to fire before `"cursorActivity"`)
* Nested operations in multiple editors are now synced (complete at same time, reducing DOM reflows)
* Visual block mode for [vim](https://codemirror.net/5/demo/vim.html) (<C-v>) is nearly complete
* New mode: [Kotlin](https://codemirror.net/5/mode/kotlin/index.html)
* Better multi-selection paste for text copied from multiple CodeMirror selections
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.3.0...4.4.0).
## 4.3.0 (2014-06-23)
* Several [vim bindings](https://codemirror.net/5/demo/vim.html) improvements: search and exCommand history, global flag for `:substitute`, `:global` command.
* Allow hiding the cursor by setting [`cursorBlinkRate`](https://codemirror.net/5/doc/manual.html#option_cursorBlinkRate) to a negative value.
* Make gutter markers themeable, use this in foldgutter.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.2.0...4.3.0).
## 4.2.0 (2014-05-19)
* Fix problem where some modes were broken by the fact that empty tokens were forbidden.
* Several fixes to context menu handling.
* On undo, scroll _change_, not cursor, into view.
* Rewritten [Jade](https://codemirror.net/5/mode/jade/index.html) mode.
* Various improvements to [Shell](https://codemirror.net/5/mode/shell/index.html) (support for more syntax) and [Python](https://codemirror.net/5/mode/python/index.html) (better indentation) modes.
* New mode: [Cypher](https://codemirror.net/5/mode/cypher/index.html).
* New theme: [Neo](https://codemirror.net/5/demo/theme.html#neo).
* Support direct styling options (color, line style, width) in the [rulers](https://codemirror.net/5/doc/manual.html#addon_rulers) addon.
* Recognize per-editor configuration for the [show-hint](https://codemirror.net/5/doc/manual.html#addon_show-hint) and [foldcode](https://codemirror.net/5/doc/manual.html#addon_foldcode) addons.
* More intelligent scanning for existing close tags in [closetag](https://codemirror.net/5/doc/manual.html#addon_closetag) addon.
* In the [Vim bindings](https://codemirror.net/5/demo/vim.html): Fix bracket matching, support case conversion in visual mode, visual paste, append action.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.1.0...4.2.0).
## 4.1.0 (2014-04-22)
* _Slightly incompatible_: The [`"cursorActivity"`](https://codemirror.net/5/doc/manual.html#event_cursorActivity) event now fires after all other events for the operation (and only for handlers that were actually registered at the time the activity happened).
* New command: [`insertSoftTab`](https://codemirror.net/5/doc/manual.html#command_insertSoftTab).
* New mode: [Django](https://codemirror.net/5/mode/django/index.html).
* Improved modes: [Verilog](https://codemirror.net/5/mode/verilog/index.html) (rewritten), [Jinja2](https://codemirror.net/5/mode/jinja2/index.html), [Haxe](https://codemirror.net/5/mode/haxe/index.html), [PHP](https://codemirror.net/5/mode/php/index.html) (string interpolation highlighted), [JavaScript](https://codemirror.net/5/mode/javascript/index.html) (indentation of trailing else, template strings), [LiveScript](https://codemirror.net/5/mode/livescript/index.html) (multi-line strings).
* Many small issues from the 3.x→4.x transition were found and fixed.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/4.0.3...4.1.0).
## 3.24.0 (2014-04-22)
Merges the improvements from 4.1 that could easily be applied to the 3.x code. Also improves the way the editor size is updated when line widgets change.
## 3.23.0 (2014-03-20)
* In the [XML mode](https://codemirror.net/5/mode/xml/index.html), add `brackets` style to angle brackets, fix case-sensitivity of tags for HTML.
* New mode: [Dylan](https://codemirror.net/5/mode/dylan/index.html).
* Many improvements to the [Vim bindings](https://codemirror.net/5/demo/vim.html).
## 3.22.0 (2014-02-21)
* Adds the [`findMarks`](https://codemirror.net/5/doc/manual.html#findMarks) method.
* New addons: [rulers](https://codemirror.net/5/doc/manual.html#addon_rulers), markdown-fold, yaml-lint.
* New theme: [mdn-like](https://codemirror.net/5/demo/theme.html#mdn-like).
* New mode: [Solr](https://codemirror.net/5/mode/solr/index.html).
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.21.0...3.22.0).
## 3.21.0 (2014-01-16)
* Auto-indenting a block will no longer add trailing whitespace to blank lines.
* Marking text has a new option [`clearWhenEmpty`](https://codemirror.net/5/doc/manual.html#markText) to control auto-removal.
* Several bugfixes in the handling of bidirectional text.
* The [XML](https://codemirror.net/5/mode/xml/index.html) and [CSS](https://codemirror.net/5/mode/css/index.html) modes were largely rewritten. [LESS](https://codemirror.net/5/mode/css/less.html) support was added to the CSS mode.
* The OCaml mode was moved to an [mllike](https://codemirror.net/5/mode/mllike/index.html) mode, F# support added.
* Make it possible to fetch multiple applicable helper values with [`getHelpers`](https://codemirror.net/5/doc/manual.html#getHelpers), and to register helpers matched on predicates with [`registerGlobalHelper`](https://codemirror.net/5/doc/manual.html#registerGlobalHelper).
* New theme [pastel-on-dark](https://codemirror.net/5/demo/theme.html#pastel-on-dark).
* Better ECMAScript 6 support in [JavaScript](https://codemirror.net/5/mode/javascript/index.html) mode.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.20.0...3.21.0).
## 3.20.0 (2013-11-21)
* New modes: [Julia](https://codemirror.net/5/mode/julia/index.html) and [PEG.js](https://codemirror.net/5/mode/pegjs/index.html).
* Support ECMAScript 6 in the [JavaScript mode](https://codemirror.net/5/mode/javascript/index.html).
* Improved indentation for the [CoffeeScript mode](https://codemirror.net/5/mode/coffeescript/index.html).
* Make non-printable-character representation [configurable](https://codemirror.net/5/doc/manual.html#option_specialChars).
* Add ‘notification’ functionality to [dialog](https://codemirror.net/5/doc/manual.html#addon_dialog) addon.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.19.0...3.20.0).
## 3.19.0 (2013-10-21)
* New modes: [Eiffel](https://codemirror.net/5/mode/eiffel/index.html), [Gherkin](https://codemirror.net/5/mode/gherkin/index.html), [MSSQL dialect](https://codemirror.net/5/mode/sql/?mime=text/x-mssql).
* New addons: [hardwrap](https://codemirror.net/5/doc/manual.html#addon_hardwrap), [sql-hint](https://codemirror.net/5/doc/manual.html#addon_sql-hint).
* New theme: [MBO](https://codemirror.net/5/demo/theme.html#mbo).
* Add [support](https://codemirror.net/5/doc/manual.html#token_style_line) for line-level styling from mode tokenizers.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.18.0...3.19.0).
## 3.18.0 (2013-09-23)
Emergency release to fix a problem in 3.17 where `.setOption("lineNumbers", false)` would raise an error.
## 3.17.0 (2013-09-23)
* New modes: [Fortran](https://codemirror.net/5/mode/fortran/index.html), [Octave](https://codemirror.net/5/mode/octave/index.html) (Matlab), [TOML](https://codemirror.net/5/mode/toml/index.html), and [DTD](https://codemirror.net/5/mode/dtd/index.html).
* New addons: [`css-lint`](https://codemirror.net/5/addon/lint/css-lint.js), [`css-hint`](https://codemirror.net/5/doc/manual.html#addon_css-hint).
* Improve resilience to CSS 'frameworks' that globally mess up `box-sizing`.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.16.0...3.17.0).
## 3.16.0 (2013-08-21)
* The whole codebase is now under a single [license](https://codemirror.net/5/LICENSE) file.
* The project page was overhauled and redesigned.
* New themes: [Paraiso](https://codemirror.net/5/demo/theme.html#paraiso-dark) ([light](https://codemirror.net/5/demo/theme.html#paraiso-light)), [The Matrix](https://codemirror.net/5/demo/theme.html#the-matrix).
* Improved interaction between themes and [active-line](https://codemirror.net/5/doc/manual.html#addon_active-line)/[matchbrackets](https://codemirror.net/5/doc/manual.html#addon_matchbrackets) addons.
* New [folding](https://codemirror.net/5/doc/manual.html#addon_foldcode) function `CodeMirror.fold.comment`.
* Added [fullscreen](https://codemirror.net/5/doc/manual.html#addon_fullscreen) addon.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.15.0...3.16.0).
## 3.15.0 (2013-07-29)
* New modes: [Jade](https://codemirror.net/5/mode/jade/index.html), [Nginx](https://codemirror.net/5/mode/nginx/index.html).
* New addons: [Tern](https://codemirror.net/5/demo/tern.html), [matchtags](https://codemirror.net/5/doc/manual.html#addon_matchtags), and [foldgutter](https://codemirror.net/5/doc/manual.html#addon_foldgutter).
* Introduced [_helper_](https://codemirror.net/5/doc/manual.html#getHelper) concept ([context](https://groups.google.com/forum/#!msg/codemirror/cOc0xvUUEUU/nLrX1-qnidgJ)).
* New method: [`getModeAt`](https://codemirror.net/5/doc/manual.html#getModeAt).
* New themes: base16 [dark](https://codemirror.net/5/demo/theme.html#base16-dark)/[light](https://codemirror.net/5/demo/theme.html#base16-light), 3024 [dark](https://codemirror.net/5/demo/theme.html#3024-night)/[light](https://codemirror.net/5/demo/theme.html#3024-day), [tomorrow-night](https://codemirror.net/5/demo/theme.html#tomorrow-night-eighties).
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.14.0...3.15.0).
## 3.14.0 (2013-06-20)
* New addons: [trailing space highlight](https://codemirror.net/5/doc/manual.html#addon_trailingspace), [XML completion](https://codemirror.net/5/doc/manual.html#addon_xml-hint) (rewritten), and [diff merging](https://codemirror.net/5/doc/manual.html#addon_merge).
* [`markText`](https://codemirror.net/5/doc/manual.html#markText) and [`addLineWidget`](https://codemirror.net/5/doc/manual.html#addLineWidget) now take a `handleMouseEvents` option.
* New methods: [`lineAtHeight`](https://codemirror.net/5/doc/manual.html#lineAtHeight), [`getTokenTypeAt`](https://codemirror.net/5/doc/manual.html#getTokenTypeAt).
* More precise cleanness-tracking using [`changeGeneration`](https://codemirror.net/5/doc/manual.html#changeGeneration) and [`isClean`](https://codemirror.net/5/doc/manual.html#isClean).
* Many extensions to [Emacs](https://codemirror.net/5/demo/emacs.html) mode (prefixes, more navigation units, and more).
* New events [`"keyHandled"`](https://codemirror.net/5/doc/manual.html#event_keyHandled) and [`"inputRead"`](https://codemirror.net/5/doc/manual.html#event_inputRead).
* Various improvements to [Ruby](https://codemirror.net/5/mode/ruby/index.html), [Smarty](https://codemirror.net/5/mode/smarty/index.html), [SQL](https://codemirror.net/5/mode/sql/index.html), and [Vim](https://codemirror.net/5/demo/vim.html) modes.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/3.13.0...3.14.0).
## 3.13.0 (2013-05-20)
* New modes: [COBOL](https://codemirror.net/5/mode/cobol/index.html) and [HAML](https://codemirror.net/5/mode/haml/index.html).
* New options: [`cursorScrollMargin`](https://codemirror.net/5/doc/manual.html#option_cursorScrollMargin) and [`coverGutterNextToScrollbar`](https://codemirror.net/5/doc/manual.html#option_coverGutterNextToScrollbar).
* New addon: [commenting](https://codemirror.net/5/doc/manual.html#addon_comment).
* More features added to the [Vim keymap](https://codemirror.net/5/demo/vim.html).
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v3.12...3.13.0).
## 3.12.0 (2013-04-19)
* New mode: [GNU assembler](https://codemirror.net/5/mode/gas/index.html).
* New options: [`maxHighlightLength`](https://codemirror.net/5/doc/manual.html#option_maxHighlightLength) and [`historyEventDelay`](https://codemirror.net/5/doc/manual.html#option_historyEventDelay).
* Added [`addToHistory`](https://codemirror.net/5/doc/manual.html#mark_addToHistory) option for `markText`.
* Various fixes to JavaScript tokenization and indentation corner cases.
* Further improvements to the vim mode.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v3.11...v3.12).
## 3.11.0 (2013-03-20)
* **Removed code:** `collapserange`, `formatting`, and `simple-hint` addons. `plsql` and `mysql` modes (use [`sql`](https://codemirror.net/5/mode/sql/index.html) mode).
* **Moved code:** the range-finding functions for folding now have [their own files](https://codemirror.net/5/addon/fold/).
* **Changed interface:** the [`continuecomment`](https://codemirror.net/5/doc/manual.html#addon_continuecomment) addon now exposes an option, rather than a command.
* New modes: [SCSS](https://codemirror.net/5/mode/css/scss.html), [Tcl](https://codemirror.net/5/mode/tcl/index.html), [LiveScript](https://codemirror.net/5/mode/livescript/index.html), and [mIRC](https://codemirror.net/5/mode/mirc/index.html).
* New addons: [`placeholder`](https://codemirror.net/5/demo/placeholder.html), [HTML completion](https://codemirror.net/5/demo/html5complete.html).
* New methods: [`hasFocus`](https://codemirror.net/5/doc/manual.html#hasFocus), [`defaultCharWidth`](https://codemirror.net/5/doc/manual.html#defaultCharWidth).
* New events: [`beforeCursorEnter`](https://codemirror.net/5/doc/manual.html#event_beforeCursorEnter), [`renderLine`](https://codemirror.net/5/doc/manual.html#event_renderLine).
* Many improvements to the [`show-hint`](https://codemirror.net/5/doc/manual.html#addon_show-hint) completion dialog addon.
* Tweak behavior of by-word cursor motion.
* Further improvements to the [vim mode](https://codemirror.net/5/demo/vim.html).
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v3.1...v3.11).
## 3.02.0 (2013-01-25)
Single-bugfix release. Fixes a problem that prevents CodeMirror instances from being garbage-collected after they become unused.
## 3.01.0 (2013-01-21)
* Move all add-ons into an organized directory structure under [`/addon`](https://codemirror.net/5/addon/). **You might have to adjust your paths.**
* New modes: [D](https://codemirror.net/5/mode/d/index.html), [Sass](https://codemirror.net/5/mode/sass/index.html), [APL](https://codemirror.net/5/mode/apl/index.html), [SQL](https://codemirror.net/5/mode/sql/index.html) (configurable), and [Asterisk](https://codemirror.net/5/mode/asterisk/index.html).
* Several bugfixes in right-to-left text support.
* Add [`rtlMoveVisually`](https://codemirror.net/5/doc/manual.html#option_rtlMoveVisually) option.
* Improvements to vim keymap.
* Add built-in (lightweight) [overlay mode](https://codemirror.net/5/doc/manual.html#addOverlay) support.
* Support `showIfHidden` option for [line widgets](https://codemirror.net/5/doc/manual.html#addLineWidget).
* Add simple [Python hinter](https://codemirror.net/5/doc/manual.html#addon_python-hint).
* Bring back the [`fixedGutter`](https://codemirror.net/5/doc/manual.html#option_fixedGutter) option.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v3.0...v3.01).
## 3.1.0 (2013-02-21)
* **Incompatible:** key handlers may now _return_, rather than _throw_ `CodeMirror.Pass` to signal they didn't handle the key.
* Make documents a [first-class construct](https://codemirror.net/5/doc/manual.html#api_doc), support split views and subviews.
* Add a [new module](https://codemirror.net/5/doc/manual.html#addon_show-hint) for showing completion hints. Deprecate `simple-hint.js`.
* Extend [htmlmixed mode](https://codemirror.net/5/mode/htmlmixed/index.html) to allow custom handling of script types.
* Support an `insertLeft` option to [`setBookmark`](https://codemirror.net/5/doc/manual.html#setBookmark).
* Add an [`eachLine`](https://codemirror.net/5/doc/manual.html#eachLine) method to iterate over a document.
* New addon modules: [selection marking](https://codemirror.net/5/demo/markselection.html), [linting](https://codemirror.net/5/demo/lint.html), and [automatic bracket closing](https://codemirror.net/5/demo/closebrackets.html).
* Add [`"beforeChange"`](https://codemirror.net/5/doc/manual.html#event_beforeChange) and [`"beforeSelectionChange"`](https://codemirror.net/5/doc/manual.html#event_beforeSelectionChange) events.
* Add [`"hide"`](https://codemirror.net/5/doc/manual.html#event_hide) and [`"unhide"`](https://codemirror.net/5/doc/manual.html#event_unhide) events to marked ranges.
* Fix [`coordsChar`](https://codemirror.net/5/doc/manual.html#coordsChar)'s interpretation of its argument to match the documentation.
* New modes: [Turtle](https://codemirror.net/5/mode/turtle/index.html) and [Q](https://codemirror.net/5/mode/q/index.html).
* Further improvements to the [vim mode](https://codemirror.net/5/demo/vim.html).
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v3.01...v3.1).
## 3.0.0 (2012-12-10)
**New major version**. Only partially backwards-compatible. See the [upgrading guide](https://codemirror.net/5/doc/upgrade_v3.html) for more information. Changes since release candidate 2:
* Rewritten VIM mode.
* Fix a few minor scrolling and sizing issues.
* Work around Safari segfault when dragging.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v3.0rc2...v3.0).
## 2.38.0 (2013-01-21)
Integrate some bugfixes, enhancements to the vim keymap, and new modes ([D](https://codemirror.net/5/mode/d/index.html), [Sass](https://codemirror.net/5/mode/sass/index.html), [APL](https://codemirror.net/5/mode/apl/index.html)) from the v3 branch.
## 2.37.0 (2012-12-20)
* New mode: [SQL](https://codemirror.net/5/mode/sql/index.html) (will replace [plsql](https://codemirror.net/5/mode/plsql/index.html) and [mysql](https://codemirror.net/5/mode/mysql/index.html) modes).
* Further work on the new VIM mode.
* Fix Cmd/Ctrl keys on recent Operas on OS X.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v2.36...v2.37).
## 2.36.0 (2012-11-20)
* New mode: [Z80 assembly](https://codemirror.net/5/mode/z80/index.html).
* New theme: [Twilight](https://codemirror.net/5/demo/theme.html#twilight).
* Add command-line compression helper.
* Make [`scrollIntoView`](https://codemirror.net/5/doc/manual.html#scrollIntoView) public.
* Add [`defaultTextHeight`](https://codemirror.net/5/doc/manual.html#defaultTextHeight) method.
* Various extensions to the vim keymap.
* Make [PHP mode](https://codemirror.net/5/mode/php/index.html) build on [mixed HTML mode](https://codemirror.net/5/mode/htmlmixed/index.html).
* Add [comment-continuing](https://codemirror.net/5/doc/manual.html#addon_continuecomment) add-on.
* Full [list of patches](https://codemirror.net/5/https://github.com/codemirror/CodeMirror/compare/v2.35...v2.36).
## 2.35.0 (2012-10-22)
* New (sub) mode: [TypeScript](https://codemirror.net/5/mode/javascript/typescript.html).
* Don't overwrite (insert key) when pasting.
* Fix several bugs in [`markText`](https://codemirror.net/5/doc/manual.html#markText)/undo interaction.
* Better indentation of JavaScript code without semicolons.
* Add [`defineInitHook`](https://codemirror.net/5/doc/manual.html#defineInitHook) function.
* Full [list of patches](https://github.com/codemirror/CodeMirror/compare/v2.34...v2.35).
## 2.34.0 (2012-09-19)
* New mode: [Common Lisp](https://codemirror.net/5/mode/commonlisp/index.html).
* Fix right-click select-all on most browsers.
* Change the way highlighting happens:
Saves memory and CPU cycles.
`compareStates` is no longer needed.
`onHighlightComplete` no longer works.
* Integrate mode (Markdown, XQuery, CSS, sTex) tests in central testsuite.
* Add a [`CodeMirror.version`](https://codemirror.net/5/doc/manual.html#version) property.
* More robust handling of nested modes in [formatting](https://codemirror.net/5/demo/formatting.html) and [closetag](https://codemirror.net/5/demo/closetag.html) plug-ins.
* Un/redo now preserves [marked text](https://codemirror.net/5/doc/manual.html#markText) and bookmarks.
* [Full list](https://github.com/codemirror/CodeMirror/compare/v2.33...v2.34) of patches.
## 2.33.0 (2012-08-23)
* New mode: [Sieve](https://codemirror.net/5/mode/sieve/index.html).
* New [`getViewPort`](https://codemirror.net/5/doc/manual.html#getViewport) and [`onViewportChange`](https://codemirror.net/5/doc/manual.html#option_onViewportChange) API.
* [Configurable](https://codemirror.net/5/doc/manual.html#option_cursorBlinkRate) cursor blink rate.
* Make binding a key to `false` disabling handling (again).
* Show non-printing characters as red dots.
* More tweaks to the scrolling model.
* Expanded testsuite. Basic linter added.
* Remove most uses of `innerHTML`. Remove `CodeMirror.htmlEscape`.
* [Full list](https://github.com/codemirror/CodeMirror/compare/v2.32...v2.33) of patches.
## 2.32.0 (2012-07-23)
Emergency fix for a bug where an editor with line wrapping on IE will break when there is _no_ scrollbar.
## 2.31.0 (2012-07-20)
* New modes: [OCaml](https://codemirror.net/5/mode/ocaml/index.html), [Haxe](https://codemirror.net/5/mode/haxe/index.html), and [VB.NET](https://codemirror.net/5/mode/vb/index.html).
* Several fixes to the new scrolling model.
* Add a [`setSize`](https://codemirror.net/5/doc/manual.html#setSize) method for programmatic resizing.
* Add [`getHistory`](https://codemirror.net/5/doc/manual.html#getHistory) and [`setHistory`](https://codemirror.net/5/doc/manual.html#setHistory) methods.
* Allow custom line separator string in [`getValue`](https://codemirror.net/5/doc/manual.html#getValue) and [`getRange`](https://codemirror.net/5/doc/manual.html#getRange).
* Support double- and triple-click drag, double-clicking whitespace.
* And more... [(all patches)](https://github.com/codemirror/CodeMirror/compare/v2.3...v2.31)
## 2.30.0 (2012-06-22)
* **New scrollbar implementation**. Should flicker less. Changes DOM structure of the editor.
* New theme: [vibrant-ink](https://codemirror.net/5/demo/theme.html#vibrant-ink).
* Many extensions to the VIM keymap (including text objects).
* Add [mode-multiplexing](https://codemirror.net/5/demo/multiplex.html) utility script.
* Fix bug where right-click paste works in read-only mode.
* Add a [`getScrollInfo`](https://codemirror.net/5/doc/manual.html#getScrollInfo) method.
* Lots of other [fixes](https://github.com/codemirror/CodeMirror/compare/v2.25...v2.3).
## 2.25.0 (2012-05-23)
* New mode: [Erlang](https://codemirror.net/5/mode/erlang/index.html).
* **Remove xmlpure mode** (use [xml.js](https://codemirror.net/5/mode/xml/index.html)).
* Fix line-wrapping in Opera.
* Fix X Windows middle-click paste in Chrome.
* Fix bug that broke pasting of huge documents.
* Fix backspace and tab key repeat in Opera.
## 2.24.0 (2012-04-23)
* **Drop support for Internet Explorer 6**.
* New modes: [Shell](https://codemirror.net/5/mode/shell/index.html), [Tiki wiki](https://codemirror.net/5/mode/tiki/index.html), [Pig Latin](https://codemirror.net/5/mode/pig/index.html).
* New themes: [Ambiance](https://codemirror.net/5/demo/theme.html#ambiance), [Blackboard](https://codemirror.net/5/demo/theme.html#blackboard).
* More control over drag/drop with [`dragDrop`](https://codemirror.net/5/doc/manual.html#option_dragDrop) and [`onDragEvent`](https://codemirror.net/5/doc/manual.html#option_onDragEvent) options.
* Make HTML mode a bit less pedantic.
* Add [`compoundChange`](https://codemirror.net/5/doc/manual.html#compoundChange) API method.
* Several fixes in undo history and line hiding.
* Remove (broken) support for `catchall` in key maps, add `nofallthrough` boolean field instead.
## 2.23.0 (2012-03-26)
* Change **default binding for tab**. Starting in 2.23, these bindings are default:
* Tab: Insert tab character
* Shift-tab: Reset line indentation to default
* Ctrl/Cmd-[: Reduce line indentation (old tab behaviour)
* Ctrl/Cmd-]: Increase line indentation (old shift-tab behaviour)
* New modes: [XQuery](https://codemirror.net/5/mode/xquery/index.html) and [VBScript](https://codemirror.net/5/mode/vbscript/index.html).
* Two new themes: [lesser-dark](https://codemirror.net/5/mode/less/index.html) and [xq-dark](https://codemirror.net/5/mode/xquery/index.html).
* Differentiate between background and text styles in [`setLineClass`](https://codemirror.net/5/doc/manual.html#setLineClass).
* Fix drag-and-drop in IE9+.
* Extend [`charCoords`](https://codemirror.net/5/doc/manual.html#charCoords) and [`cursorCoords`](https://codemirror.net/5/doc/manual.html#cursorCoords) with a `mode` argument.
* Add [`autofocus`](https://codemirror.net/5/doc/manual.html#option_autofocus) option.
* Add [`findMarksAt`](https://codemirror.net/5/doc/manual.html#findMarksAt) method.
## 2.22.0 (2012-02-27)
* Allow [key handlers](https://codemirror.net/5/doc/manual.html#keymaps) to pass up events, allow binding characters.
* Add [`autoClearEmptyLines`](https://codemirror.net/5/doc/manual.html#option_autoClearEmptyLines) option.
* Properly use tab stops when rendering tabs.
* Make PHP mode more robust.
* Support indentation blocks in [code folder](https://codemirror.net/5/doc/manual.html#addon_foldcode).
* Add a script for [highlighting instances of the selection](https://codemirror.net/5/doc/manual.html#addon_match-highlighter).
* New [.properties](https://codemirror.net/5/mode/properties/index.html) mode.
* Fix many bugs.
## 2.21.0 (2012-01-27)
* Added [LESS](https://codemirror.net/5/mode/less/index.html), [MySQL](https://codemirror.net/5/mode/mysql/index.html), [Go](https://codemirror.net/5/mode/go/index.html), and [Verilog](https://codemirror.net/5/mode/verilog/index.html) modes.
* Add [`smartIndent`](https://codemirror.net/5/doc/manual.html#option_smartIndent) option.
* Support a cursor in [`readOnly`](https://codemirror.net/5/doc/manual.html#option_readOnly)-mode.
* Support assigning multiple styles to a token.
* Use a new approach to drawing the selection.
* Add [`scrollTo`](https://codemirror.net/5/doc/manual.html#scrollTo) method.
* Allow undo/redo events to span non-adjacent lines.
* Lots and lots of bugfixes.
## 2.20.0 (2011-12-20)
* Slightly incompatible API changes. Read [this](https://codemirror.net/5/doc/upgrade_v2.2.html).
* New approach to [binding](https://codemirror.net/5/doc/manual.html#option_extraKeys) keys, support for [custom bindings](https://codemirror.net/5/doc/manual.html#option_keyMap).
* Support for overwrite (insert).
* [Custom-width](https://codemirror.net/5/doc/manual.html#option_tabSize) and [styleable](https://codemirror.net/5/demo/visibletabs.html) tabs.
* Moved more code into [add-on scripts](https://codemirror.net/5/doc/manual.html#addons).
* Support for sane vertical cursor movement in wrapped lines.
* More reliable handling of editing [marked text](https://codemirror.net/5/doc/manual.html#markText).
* Add minimal [emacs](https://codemirror.net/5/demo/emacs.html) and [vim](https://codemirror.net/5/demo/vim.html) bindings.
* Rename `coordsFromIndex` to [`posFromIndex`](https://codemirror.net/5/doc/manual.html#posFromIndex), add [`indexFromPos`](https://codemirror.net/5/doc/manual.html#indexFromPos) method.
## 2.18.0 (2011-11-21)
Fixes `TextMarker.clear`, which is broken in 2.17.
## 2.17.0 (2011-11-21)
* Add support for [line wrapping](https://codemirror.net/5/doc/manual.html#option_lineWrapping) and [code folding](https://codemirror.net/5/doc/manual.html#hideLine).
* Add [GitHub-style Markdown](https://codemirror.net/5/mode/gfm/index.html) mode.
* Add [Monokai](https://codemirror.net/5/theme/monokai.css) and [Rubyblue](https://codemirror.net/5/theme/rubyblue.css) themes.
* Add [`setBookmark`](https://codemirror.net/5/doc/manual.html#setBookmark) method.
* Move some of the demo code into reusable components under [`lib/util`](https://codemirror.net/5/addon/).
* Make screen-coord-finding code faster and more reliable.
* Fix drag-and-drop in Firefox.
* Improve support for IME.
* Speed up content rendering.
* Fix browser's built-in search in Webkit.
* Make double- and triple-click work in IE.
* Various fixes to modes.
## 2.16.0 (2011-10-27)
* Add [Perl](https://codemirror.net/5/mode/perl/index.html), [Rust](https://codemirror.net/5/mode/rust/index.html), [TiddlyWiki](https://codemirror.net/5/mode/tiddlywiki/index.html), and [Groovy](https://codemirror.net/5/mode/groovy/index.html) modes.
* Dragging text inside the editor now moves, rather than copies.
* Add a [`coordsFromIndex`](https://codemirror.net/5/doc/manual.html#coordsFromIndex) method.
* **API change**: `setValue` now no longer clears history. Use [`clearHistory`](https://codemirror.net/5/doc/manual.html#clearHistory) for that.
* **API change**: [`markText`](https://codemirror.net/5/doc/manual.html#markText) now returns an object with `clear` and `find` methods. Marked text is now more robust when edited.
* Fix editing code with tabs in Internet Explorer.
## 2.15.0 (2011-09-26)
Fix bug that snuck into 2.14: Clicking the character that currently has the cursor didn't re-focus the editor.
## 2.14.0 (2011-09-26)
* Add [Clojure](https://codemirror.net/5/mode/clojure/index.html), [Pascal](https://codemirror.net/5/mode/pascal/index.html), [NTriples](https://codemirror.net/5/mode/ntriples/index.html), [Jinja2](https://codemirror.net/5/mode/jinja2/index.html), and [Markdown](https://codemirror.net/5/mode/markdown/index.html) modes.
* Add [Cobalt](https://codemirror.net/5/theme/cobalt.css) and [Eclipse](https://codemirror.net/5/theme/eclipse.css) themes.
* Add a [`fixedGutter`](https://codemirror.net/5/doc/manual.html#option_fixedGutter) option.
* Fix bug with `setValue` breaking cursor movement.
* Make gutter updates much more efficient.
* Allow dragging of text out of the editor (on modern browsers).
## 2.13.0 (2011-08-23)
* Add [Ruby](https://codemirror.net/5/mode/ruby/index.html), [R](https://codemirror.net/5/mode/r/index.html), [CoffeeScript](https://codemirror.net/5/mode/coffeescript/index.html), and [Velocity](https://codemirror.net/5/mode/velocity/index.html) modes.
* Add [`getGutterElement`](https://codemirror.net/5/doc/manual.html#getGutterElement) to API.
* Several fixes to scrolling and positioning.
* Add [`smartHome`](https://codemirror.net/5/doc/manual.html#option_smartHome) option.
* Add an experimental [pure XML](https://codemirror.net/5/mode/xmlpure/index.html) mode.
## 2.12.0 (2011-07-25)
* Add a [SPARQL](https://codemirror.net/5/mode/sparql/index.html) mode.
* Fix bug with cursor jumping around in an unfocused editor in IE.
* Allow key and mouse events to bubble out of the editor. Ignore widget clicks.
* Solve cursor flakiness after undo/redo.
* Fix block-reindent ignoring the last few lines.
* Fix parsing of multi-line attrs in XML mode.
* Use `innerHTML` for HTML-escaping.
* Some fixes to indentation in C-like mode.
* Shrink horiz scrollbars when long lines removed.
* Fix width feedback loop bug that caused the width of an inner DIV to shrink.
## 2.11.0 (2011-07-04)
* Add a [Scheme mode](https://codemirror.net/5/mode/scheme/index.html).
* Add a `replace` method to search cursors, for cursor-preserving replacements.
* Make the [C-like mode](https://codemirror.net/5/mode/clike/index.html) mode more customizable.
* Update XML mode to spot mismatched tags.
* Add `getStateAfter` API and `compareState` mode API methods for finer-grained mode magic.
* Add a `getScrollerElement` API method to manipulate the scrolling DIV.
* Fix drag-and-drop for Firefox.
* Add a C# configuration for the [C-like mode](https://codemirror.net/5/mode/clike/index.html).
* Add [full-screen editing](https://codemirror.net/5/demo/fullscreen.html) and [mode-changing](https://codemirror.net/5/demo/changemode.html) demos.
## 2.10.0 (2011-06-07)
Add a [theme](https://codemirror.net/5/doc/manual.html#option_theme) system ([demo](https://codemirror.net/5/demo/theme.html)). Note that this is not backwards-compatible—you'll have to update your styles and modes!
## 2.2.0 (2011-06-07)
* Add a [Lua mode](https://codemirror.net/5/mode/lua/index.html).
* Fix reverse-searching for a regexp.
* Empty lines can no longer break highlighting.
* Rework scrolling model (the outer wrapper no longer does the scrolling).
* Solve horizontal jittering on long lines.
* Add [runmode.js](https://codemirror.net/5/demo/runmode.html).
* Immediately re-highlight text when typing.
* Fix problem with 'sticking' horizontal scrollbar.
## 2.1.0 (2011-05-26)
* Add a [Smalltalk mode](https://codemirror.net/5/mode/smalltalk/index.html).
* Add a [reStructuredText mode](https://codemirror.net/5/mode/rst/index.html).
* Add a [Python mode](https://codemirror.net/5/mode/python/index.html).
* Add a [PL/SQL mode](https://codemirror.net/5/mode/plsql/index.html).
* `coordsChar` now works
* Fix a problem where `onCursorActivity` interfered with `onChange`.
* Fix a number of scrolling and mouse-click-position glitches.
* Pass information about the changed lines to `onChange`.
* Support cmd-up/down on OS X.
* Add triple-click line selection.
* Don't handle shift when changing the selection through the API.
* Support `"nocursor"` mode for `readOnly` option.
* Add an `onHighlightComplete` option.
* Fix the context menu for Firefox.
## 2.0.0 (2011-03-28)
CodeMirror 2 is a complete rewrite that's faster, smaller, simpler to use, and less dependent on browser quirks. See [this](https://codemirror.net/5/doc/internals.html) and [this](http://groups.google.com/group/codemirror/browse_thread/thread/5a8e894024a9f580) for more information.
================================================
FILE: CONTRIBUTING.md
================================================
# How to contribute
- [Getting help](#getting-help)
- [Submitting bug reports](#submitting-bug-reports)
- [Contributing code](#contributing-code)
## Getting help
Community discussion, questions, and informal bug reporting is done on the
[discuss.CodeMirror forum](http://discuss.codemirror.net).
## Submitting bug reports
The preferred way to report bugs is to use the
[GitHub issue tracker](http://github.com/codemirror/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
[discuss.CodeMirror forum](http://discuss.codemirror.net) 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
Note that we are not accepting any new addons or modes into the main
distribution. If you've written such a module, please distribute it as
a separate NPM package.
Code written by "AI" language models (either partially or fully) is
**not welcome**. Both because you cannot guarantee it's not parroting
copyrighted content, and because it tends to be of low quality and a
waste of time to review.
- Make sure you have a [GitHub Account](https://github.com/signup/free)
- Fork [CodeMirror](https://github.com/codemirror/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`).
- Follow the general code style of the rest of the project (see
below). Run `bin/lint` to verify that the linter is happy.
- 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)).
Don't put more than one feature/fix in a single pull request.
By contributing code to CodeMirror you
- agree to license the contributed code under CodeMirror's [MIT
license](https://codemirror.net/5/LICENSE).
- confirm that you have the right to contribute and license the code
in question. (Either you hold all rights on the code, or the rights
holder has explicitly granted the right to use it like this,
through a compatible open source license or through a direct
agreement with you.)
### Coding standards
- 2 spaces per indentation level, no tabs.
- Note that the linter (`bin/lint`) which is run after each commit
complains about unused variables and functions. Prefix their names
with an underscore to muffle it.
- CodeMirror does *not* follow JSHint or JSLint prescribed style.
Patches that try to 'fix' code to pass one of these linters will be
unceremoniously discarded.
================================================
FILE: LICENSE
================================================
MIT License
Copyright (C) 2017 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.md
================================================
# CodeMirror 5
**NOTE:** [CodeMirror 6](https://codemirror.net/) exists, and is more mobile-friendly, more accessible, better designed, and much more actively maintained.
[](https://github.com/codemirror/codemirror5/actions)
CodeMirror is a versatile text editor implemented in JavaScript for
the browser. It is specialized for editing code, and comes with over
100 language modes and various addons that implement more advanced
editing functionality. Every language comes with fully-featured code
and syntax highlighting to help with reading and editing complex code.
A rich programming API and a CSS theming system are available for
customizing CodeMirror to fit your application, and extending it with
new functionality.
You can find more information (and the
[manual](https://codemirror.net/5/doc/manual.html)) on the [project
page](https://codemirror.net/5/). For questions and discussion, use the
[discussion forum](https://discuss.codemirror.net/).
See
[CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md)
for contributing guidelines.
The CodeMirror community aims to be welcoming to everybody. We use the
[Contributor Covenant
(1.1)](http://contributor-covenant.org/version/1/1/0/) as our code of
conduct.
### Installation
Either get the [zip file](https://codemirror.net/5/codemirror.zip) with
the latest version, or make sure you have [Node](https://nodejs.org/)
installed and run:
npm install codemirror@5
**NOTE**: This is the source repository for the library, and not the
distribution channel. Cloning it is not the recommended way to install
the library, and will in fact not work unless you also run the build
step.
### Quickstart
To build the project, make sure you have Node.js installed (at least version 6)
and then `npm install`. To run, just open `index.html` in your
browser (you don't need to run a webserver). Run the tests with `npm test`.
================================================
FILE: addon/comment/comment.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
var noOptions = {};
var nonWS = /[^\s\u00a0]/;
var Pos = CodeMirror.Pos, cmp = CodeMirror.cmpPos;
function firstNonWS(str) {
var found = str.search(nonWS);
return found == -1 ? 0 : found;
}
CodeMirror.commands.toggleComment = function(cm) {
cm.toggleComment();
};
CodeMirror.defineExtension("toggleComment", function(options) {
if (!options) options = noOptions;
var cm = this;
var minLine = Infinity, ranges = this.listSelections(), mode = null;
for (var i = ranges.length - 1; i >= 0; i--) {
var from = ranges[i].from(), to = ranges[i].to();
if (from.line >= minLine) continue;
if (to.line >= minLine) to = Pos(minLine, 0);
minLine = from.line;
if (mode == null) {
if (cm.uncomment(from, to, options)) mode = "un";
else { cm.lineComment(from, to, options); mode = "line"; }
} else if (mode == "un") {
cm.uncomment(from, to, options);
} else {
cm.lineComment(from, to, options);
}
}
});
// Rough heuristic to try and detect lines that are part of multi-line string
function probablyInsideString(cm, pos, line) {
return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0))) && !/^[\'\"\`]/.test(line)
}
function getMode(cm, pos) {
var mode = cm.getMode()
return mode.useInnerComments === false || !mode.innerMode ? mode : cm.getModeAt(pos)
}
CodeMirror.defineExtension("lineComment", function(from, to, options) {
if (!options) options = noOptions;
var self = this, mode = getMode(self, from);
var firstLine = self.getLine(from.line);
if (firstLine == null || probablyInsideString(self, from, firstLine)) return;
var commentString = options.lineComment || mode.lineComment;
if (!commentString) {
if (options.blockCommentStart || mode.blockCommentStart) {
options.fullLines = true;
self.blockComment(from, to, options);
}
return;
}
var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);
var pad = options.padding == null ? " " : options.padding;
var blankLines = options.commentBlankLines || from.line == to.line;
self.operation(function() {
if (options.indent) {
var baseString = null;
for (var i = from.line; i < end; ++i) {
var line = self.getLine(i);
var whitespace = line.search(nonWS) === -1 ? line : line.slice(0, firstNonWS(line));
if (baseString == null || baseString.length > whitespace.length) {
baseString = whitespace;
}
}
for (var i = from.line; i < end; ++i) {
var line = self.getLine(i), cut = baseString.length;
if (!blankLines && !nonWS.test(line)) continue;
if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
}
} else {
for (var i = from.line; i < end; ++i) {
if (blankLines || nonWS.test(self.getLine(i)))
self.replaceRange(commentString + pad, Pos(i, 0));
}
}
});
});
CodeMirror.defineExtension("blockComment", function(from, to, options) {
if (!options) options = noOptions;
var self = this, mode = getMode(self, from);
var startString = options.blockCommentStart || mode.blockCommentStart;
var endString = options.blockCommentEnd || mode.blockCommentEnd;
if (!startString || !endString) {
if ((options.lineComment || mode.lineComment) && options.fullLines != false)
self.lineComment(from, to, options);
return;
}
if (/\bcomment\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return
var end = Math.min(to.line, self.lastLine());
if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
var pad = options.padding == null ? " " : options.padding;
if (from.line > end) return;
self.operation(function() {
if (options.fullLines != false) {
var lastLineHasText = nonWS.test(self.getLine(end));
self.replaceRange(pad + endString, Pos(end));
self.replaceRange(startString + pad, Pos(from.line, 0));
var lead = options.blockCommentLead || mode.blockCommentLead;
if (lead != null) for (var i = from.line + 1; i <= end; ++i)
if (i != end || lastLineHasText)
self.replaceRange(lead + pad, Pos(i, 0));
} else {
var atCursor = cmp(self.getCursor("to"), to) == 0, empty = !self.somethingSelected()
self.replaceRange(endString, to);
if (atCursor) self.setSelection(empty ? to : self.getCursor("from"), to)
self.replaceRange(startString, from);
}
});
});
CodeMirror.defineExtension("uncomment", function(from, to, options) {
if (!options) options = noOptions;
var self = this, mode = getMode(self, from);
var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);
// Try finding line comments
var lineString = options.lineComment || mode.lineComment, lines = [];
var pad = options.padding == null ? " " : options.padding, didSomething;
lineComment: {
if (!lineString) break lineComment;
for (var i = start; i <= end; ++i) {
var line = self.getLine(i);
var found = line.indexOf(lineString);
if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
if (found == -1 && nonWS.test(line)) break lineComment;
if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
lines.push(line);
}
self.operation(function() {
for (var i = start; i <= end; ++i) {
var line = lines[i - start];
var pos = line.indexOf(lineString), endPos = pos + lineString.length;
if (pos < 0) continue;
if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;
didSomething = true;
self.replaceRange("", Pos(i, pos), Pos(i, endPos));
}
});
if (didSomething) return true;
}
// Try block comments
var startString = options.blockCommentStart || mode.blockCommentStart;
var endString = options.blockCommentEnd || mode.blockCommentEnd;
if (!startString || !endString) return false;
var lead = options.blockCommentLead || mode.blockCommentLead;
var startLine = self.getLine(start), open = startLine.indexOf(startString)
if (open == -1) return false
var endLine = end == start ? startLine : self.getLine(end)
var close = endLine.indexOf(endString, end == start ? open + startString.length : 0);
var insideStart = Pos(start, open + 1), insideEnd = Pos(end, close + 1)
if (close == -1 ||
!/comment/.test(self.getTokenTypeAt(insideStart)) ||
!/comment/.test(self.getTokenTypeAt(insideEnd)) ||
self.getRange(insideStart, insideEnd, "\n").indexOf(endString) > -1)
return false;
// Avoid killing block comments completely outside the selection.
// Positions of the last startString before the start of the selection, and the first endString after it.
var lastStart = startLine.lastIndexOf(startString, from.ch);
var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);
if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;
// Positions of the first endString after the end of the selection, and the last startString before it.
firstEnd = endLine.indexOf(endString, to.ch);
var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);
lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;
if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;
self.operation(function() {
self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),
Pos(end, close + endString.length));
var openEnd = open + startString.length;
if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;
self.replaceRange("", Pos(start, open), Pos(start, openEnd));
if (lead) for (var i = start + 1; i <= end; ++i) {
var line = self.getLine(i), found = line.indexOf(lead);
if (found == -1 || nonWS.test(line.slice(0, found))) continue;
var foundEnd = found + lead.length;
if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;
self.replaceRange("", Pos(i, found), Pos(i, foundEnd));
}
});
return true;
});
});
================================================
FILE: addon/comment/continuecomment.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
var nonspace = /\S/g;
var repeat = String.prototype.repeat || function (n) { return Array(n + 1).join(this); };
function continueComment(cm) {
if (cm.getOption("disableInput")) return CodeMirror.Pass;
var ranges = cm.listSelections(), mode, inserts = [];
for (var i = 0; i < ranges.length; i++) {
var pos = ranges[i].head
if (!/\bcomment\b/.test(cm.getTokenTypeAt(pos))) return CodeMirror.Pass;
var modeHere = cm.getModeAt(pos)
if (!mode) mode = modeHere;
else if (mode != modeHere) return CodeMirror.Pass;
var insert = null, line, found;
var blockStart = mode.blockCommentStart, lineCmt = mode.lineComment;
if (blockStart && mode.blockCommentContinue) {
line = cm.getLine(pos.line);
var end = line.lastIndexOf(mode.blockCommentEnd, pos.ch - mode.blockCommentEnd.length);
// 1. if this block comment ended
// 2. if this is actually inside a line comment
if (end != -1 && end == pos.ch - mode.blockCommentEnd.length ||
lineCmt && (found = line.lastIndexOf(lineCmt, pos.ch - 1)) > -1 &&
/\bcomment\b/.test(cm.getTokenTypeAt({line: pos.line, ch: found + 1}))) {
// ...then don't continue it
} else if (pos.ch >= blockStart.length &&
(found = line.lastIndexOf(blockStart, pos.ch - blockStart.length)) > -1 &&
found > end) {
// reuse the existing leading spaces/tabs/mixed
// or build the correct indent using CM's tab/indent options
if (nonspaceAfter(0, line) >= found) {
insert = line.slice(0, found);
} else {
var tabSize = cm.options.tabSize, numTabs;
found = CodeMirror.countColumn(line, found, tabSize);
insert = !cm.options.indentWithTabs ? repeat.call(" ", found) :
repeat.call("\t", (numTabs = Math.floor(found / tabSize))) +
repeat.call(" ", found - tabSize * numTabs);
}
} else if ((found = line.indexOf(mode.blockCommentContinue)) > -1 &&
found <= pos.ch &&
found <= nonspaceAfter(0, line)) {
insert = line.slice(0, found);
}
if (insert != null) insert += mode.blockCommentContinue
}
if (insert == null && lineCmt && continueLineCommentEnabled(cm)) {
if (line == null) line = cm.getLine(pos.line);
found = line.indexOf(lineCmt);
// cursor at pos 0, line comment also at pos 0 => shift it down, don't continue
if (!pos.ch && !found) insert = "";
// continue only if the line starts with an optional space + line comment
else if (found > -1 && nonspaceAfter(0, line) >= found) {
// don't continue if there's only space(s) after cursor or the end of the line
insert = nonspaceAfter(pos.ch, line) > -1;
// but always continue if the next line starts with a line comment too
if (!insert) {
var next = cm.getLine(pos.line + 1) || '',
nextFound = next.indexOf(lineCmt);
insert = nextFound > -1 && nonspaceAfter(0, next) >= nextFound || null;
}
if (insert) {
insert = line.slice(0, found) + lineCmt +
line.slice(found + lineCmt.length).match(/^\s*/)[0];
}
}
}
if (insert == null) return CodeMirror.Pass;
inserts[i] = "\n" + insert;
}
cm.operation(function() {
for (var i = ranges.length - 1; i >= 0; i--)
cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), "+insert");
});
}
function nonspaceAfter(ch, str) {
nonspace.lastIndex = ch;
var m = nonspace.exec(str);
return m ? m.index : -1;
}
function continueLineCommentEnabled(cm) {
var opt = cm.getOption("continueComments");
if (opt && typeof opt == "object")
return opt.continueLineComment !== false;
return true;
}
CodeMirror.defineOption("continueComments", null, function(cm, val, prev) {
if (prev && prev != CodeMirror.Init)
cm.removeKeyMap("continueComment");
if (val) {
var key = "Enter";
if (typeof val == "string")
key = val;
else if (typeof val == "object" && val.key)
key = val.key;
var map = {name: "continueComment"};
map[key] = continueComment;
cm.addKeyMap(map);
}
});
});
================================================
FILE: addon/dialog/dialog.css
================================================
.CodeMirror-dialog {
position: absolute;
left: 0; right: 0;
background: inherit;
z-index: 15;
padding: .1em .8em;
overflow: hidden;
color: inherit;
}
.CodeMirror-dialog-top {
border-bottom: 1px solid #eee;
top: 0;
}
.CodeMirror-dialog-bottom {
border-top: 1px solid #eee;
bottom: 0;
}
.CodeMirror-dialog input {
border: none;
outline: none;
background: transparent;
width: 20em;
color: inherit;
font-family: monospace;
}
.CodeMirror-dialog button {
font-size: 70%;
}
================================================
FILE: addon/dialog/dialog.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
// Open simple dialogs on top of an editor. Relies on dialog.css.
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
function dialogDiv(cm, template, bottom) {
var wrap = cm.getWrapperElement();
var dialog;
dialog = wrap.appendChild(document.createElement("div"));
if (bottom)
dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
else
dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
if (typeof template == "string") {
dialog.innerHTML = template;
} else { // Assuming it's a detached DOM element.
dialog.appendChild(template);
}
CodeMirror.addClass(wrap, 'dialog-opened');
return dialog;
}
function closeNotification(cm, newVal) {
if (cm.state.currentNotificationClose)
cm.state.currentNotificationClose();
cm.state.currentNotificationClose = newVal;
}
CodeMirror.defineExtension("openDialog", function(template, callback, options) {
if (!options) options = {};
closeNotification(this, null);
var dialog = dialogDiv(this, template, options.bottom);
var closed = false, me = this;
function close(newVal) {
if (typeof newVal == 'string') {
inp.value = newVal;
} else {
if (closed) return;
closed = true;
CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
dialog.parentNode.removeChild(dialog);
me.focus();
if (options.onClose) options.onClose(dialog);
}
}
var inp = dialog.getElementsByTagName("input")[0], button;
if (inp) {
inp.focus();
if (options.value) {
inp.value = options.value;
if (options.selectValueOnOpen !== false) {
inp.select();
}
}
if (options.onInput)
CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
if (options.onKeyUp)
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
CodeMirror.on(inp, "keydown", function(e) {
if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {
inp.blur();
CodeMirror.e_stop(e);
close();
}
if (e.keyCode == 13) callback(inp.value, e);
});
if (options.closeOnBlur !== false) CodeMirror.on(dialog, "focusout", function (evt) {
if (evt.relatedTarget !== null) close();
});
} else if (button = dialog.getElementsByTagName("button")[0]) {
CodeMirror.on(button, "click", function() {
close();
me.focus();
});
if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
button.focus();
}
return close;
});
CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {
closeNotification(this, null);
var dialog = dialogDiv(this, template, options && options.bottom);
var buttons = dialog.getElementsByTagName("button");
var closed = false, me = this, blurring = 1;
function close() {
if (closed) return;
closed = true;
CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
dialog.parentNode.removeChild(dialog);
me.focus();
}
buttons[0].focus();
for (var i = 0; i < buttons.length; ++i) {
var b = buttons[i];
(function(callback) {
CodeMirror.on(b, "click", function(e) {
CodeMirror.e_preventDefault(e);
close();
if (callback) callback(me);
});
})(callbacks[i]);
CodeMirror.on(b, "blur", function() {
--blurring;
setTimeout(function() { if (blurring <= 0) close(); }, 200);
});
CodeMirror.on(b, "focus", function() { ++blurring; });
}
});
/*
* openNotification
* Opens a notification, that can be closed with an optional timer
* (default 5000ms timer) and always closes on click.
*
* If a notification is opened while another is opened, it will close the
* currently opened one and open the new one immediately.
*/
CodeMirror.defineExtension("openNotification", function(template, options) {
closeNotification(this, close);
var dialog = dialogDiv(this, template, options && options.bottom);
var closed = false, doneTimer;
var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;
function close() {
if (closed) return;
closed = true;
clearTimeout(doneTimer);
CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
dialog.parentNode.removeChild(dialog);
}
CodeMirror.on(dialog, 'click', function(e) {
CodeMirror.e_preventDefault(e);
close();
});
if (duration)
doneTimer = setTimeout(close, duration);
return close;
});
});
================================================
FILE: addon/display/autorefresh.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"))
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod)
else // Plain browser env
mod(CodeMirror)
})(function(CodeMirror) {
"use strict"
CodeMirror.defineOption("autoRefresh", false, function(cm, val) {
if (cm.state.autoRefresh) {
stopListening(cm, cm.state.autoRefresh)
cm.state.autoRefresh = null
}
if (val && cm.display.wrapper.offsetHeight == 0)
startListening(cm, cm.state.autoRefresh = {delay: val.delay || 250})
})
function startListening(cm, state) {
function check() {
if (cm.display.wrapper.offsetHeight) {
stopListening(cm, state)
if (cm.display.lastWrapHeight != cm.display.wrapper.clientHeight)
cm.refresh()
} else {
state.timeout = setTimeout(check, state.delay)
}
}
state.timeout = setTimeout(check, state.delay)
state.hurry = function() {
clearTimeout(state.timeout)
state.timeout = setTimeout(check, 50)
}
CodeMirror.on(window, "mouseup", state.hurry)
CodeMirror.on(window, "keyup", state.hurry)
}
function stopListening(_cm, state) {
clearTimeout(state.timeout)
CodeMirror.off(window, "mouseup", state.hurry)
CodeMirror.off(window, "keyup", state.hurry)
}
});
================================================
FILE: addon/display/fullscreen.css
================================================
.CodeMirror-fullscreen {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
height: auto;
z-index: 9;
}
================================================
FILE: addon/display/fullscreen.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {
if (old == CodeMirror.Init) old = false;
if (!old == !val) return;
if (val) setFullscreen(cm);
else setNormal(cm);
});
function setFullscreen(cm) {
var wrap = cm.getWrapperElement();
cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,
width: wrap.style.width, height: wrap.style.height};
wrap.style.width = "";
wrap.style.height = "auto";
wrap.className += " CodeMirror-fullscreen";
document.documentElement.style.overflow = "hidden";
cm.refresh();
}
function setNormal(cm) {
var wrap = cm.getWrapperElement();
wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, "");
document.documentElement.style.overflow = "";
var info = cm.state.fullScreenRestore;
wrap.style.width = info.width; wrap.style.height = info.height;
window.scrollTo(info.scrollLeft, info.scrollTop);
cm.refresh();
}
});
================================================
FILE: addon/display/panel.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function (mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function (CodeMirror) {
CodeMirror.defineExtension("addPanel", function (node, options) {
options = options || {};
if (!this.state.panels) initPanels(this);
var info = this.state.panels;
var wrapper = info.wrapper;
var cmWrapper = this.getWrapperElement();
var replace = options.replace instanceof Panel && !options.replace.cleared;
if (options.after instanceof Panel && !options.after.cleared) {
wrapper.insertBefore(node, options.before.node.nextSibling);
} else if (options.before instanceof Panel && !options.before.cleared) {
wrapper.insertBefore(node, options.before.node);
} else if (replace) {
wrapper.insertBefore(node, options.replace.node);
options.replace.clear(true);
} else if (options.position == "bottom") {
wrapper.appendChild(node);
} else if (options.position == "before-bottom") {
wrapper.insertBefore(node, cmWrapper.nextSibling);
} else if (options.position == "after-top") {
wrapper.insertBefore(node, cmWrapper);
} else {
wrapper.insertBefore(node, wrapper.firstChild);
}
var height = (options && options.height) || node.offsetHeight;
var panel = new Panel(this, node, options, height);
info.panels.push(panel);
this.setSize();
if (options.stable && isAtTop(this, node))
this.scrollTo(null, this.getScrollInfo().top + height);
return panel;
});
function Panel(cm, node, options, height) {
this.cm = cm;
this.node = node;
this.options = options;
this.height = height;
this.cleared = false;
}
/* when skipRemove is true, clear() was called from addPanel().
* Thus removePanels() should not be called (issue 5518) */
Panel.prototype.clear = function (skipRemove) {
if (this.cleared) return;
this.cleared = true;
var info = this.cm.state.panels;
info.panels.splice(info.panels.indexOf(this), 1);
this.cm.setSize();
if (this.options.stable && isAtTop(this.cm, this.node))
this.cm.scrollTo(null, this.cm.getScrollInfo().top - this.height)
info.wrapper.removeChild(this.node);
if (info.panels.length == 0 && !skipRemove) removePanels(this.cm);
};
Panel.prototype.changed = function () {
this.height = this.node.getBoundingClientRect().height;
this.cm.setSize();
};
function initPanels(cm) {
var wrap = cm.getWrapperElement()
var style = window.getComputedStyle ? window.getComputedStyle(wrap) : wrap.currentStyle;
var height = parseInt(style.height);
var info = cm.state.panels = {
setHeight: wrap.style.height,
panels: [],
wrapper: document.createElement("div")
};
var hasFocus = cm.hasFocus(), scrollPos = cm.getScrollInfo()
wrap.parentNode.insertBefore(info.wrapper, wrap);
info.wrapper.appendChild(wrap);
cm.scrollTo(scrollPos.left, scrollPos.top)
if (hasFocus) cm.focus();
cm._setSize = cm.setSize;
if (height != null) cm.setSize = function (width, newHeight) {
if (!newHeight) newHeight = info.wrapper.offsetHeight;
info.setHeight = newHeight;
if (typeof newHeight != "number") {
var px = /^(\d+\.?\d*)px$/.exec(newHeight);
if (px) {
newHeight = Number(px[1]);
} else {
info.wrapper.style.height = newHeight;
newHeight = info.wrapper.offsetHeight;
}
}
var editorheight = newHeight - info.panels
.map(function (p) { return p.node.getBoundingClientRect().height; })
.reduce(function (a, b) { return a + b; }, 0);
cm._setSize(width, editorheight);
height = newHeight;
};
}
function removePanels(cm) {
var info = cm.state.panels;
cm.state.panels = null;
var wrap = cm.getWrapperElement()
var hasFocus = cm.hasFocus(), scrollPos = cm.getScrollInfo()
info.wrapper.parentNode.replaceChild(wrap, info.wrapper);
cm.scrollTo(scrollPos.left, scrollPos.top)
if (hasFocus) cm.focus();
wrap.style.height = info.setHeight;
cm.setSize = cm._setSize;
cm.setSize();
}
function isAtTop(cm, dom) {
for (var sibling = dom.nextSibling; sibling; sibling = sibling.nextSibling)
if (sibling == cm.getWrapperElement()) return true
return false
}
});
================================================
FILE: addon/display/placeholder.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
CodeMirror.defineOption("placeholder", "", function(cm, val, old) {
var prev = old && old != CodeMirror.Init;
if (val && !prev) {
cm.on("blur", onBlur);
cm.on("change", onChange);
cm.on("swapDoc", onChange);
CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = function() { onComposition(cm) })
onChange(cm);
} else if (!val && prev) {
cm.off("blur", onBlur);
cm.off("change", onChange);
cm.off("swapDoc", onChange);
CodeMirror.off(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose)
clearPlaceholder(cm);
var wrapper = cm.getWrapperElement();
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "");
}
if (val && !cm.hasFocus()) onBlur(cm);
});
function clearPlaceholder(cm) {
if (cm.state.placeholder) {
cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);
cm.state.placeholder = null;
}
}
function setPlaceholder(cm) {
clearPlaceholder(cm);
var elt = cm.state.placeholder = document.createElement("pre");
elt.style.cssText = "height: 0; overflow: visible";
elt.style.direction = cm.getOption("direction");
elt.className = "CodeMirror-placeholder CodeMirror-line-like";
var placeHolder = cm.getOption("placeholder")
if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder)
elt.appendChild(placeHolder)
cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
}
function onComposition(cm) {
setTimeout(function() {
var empty = false
if (cm.lineCount() == 1) {
var input = cm.getInputField()
empty = input.nodeName == "TEXTAREA" ? !cm.getLine(0).length
: !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent)
}
if (empty) setPlaceholder(cm)
else clearPlaceholder(cm)
}, 20)
}
function onBlur(cm) {
if (isEmpty(cm)) setPlaceholder(cm);
}
function onChange(cm) {
var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : "");
if (empty) setPlaceholder(cm);
else clearPlaceholder(cm);
}
function isEmpty(cm) {
return (cm.lineCount() === 1) && (cm.getLine(0) === "");
}
});
================================================
FILE: addon/display/rulers.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineOption("rulers", false, function(cm, val) {
if (cm.state.rulerDiv) {
cm.state.rulerDiv.parentElement.removeChild(cm.state.rulerDiv)
cm.state.rulerDiv = null
cm.off("refresh", drawRulers)
}
if (val && val.length) {
cm.state.rulerDiv = cm.display.lineSpace.parentElement.insertBefore(document.createElement("div"), cm.display.lineSpace)
cm.state.rulerDiv.className = "CodeMirror-rulers"
drawRulers(cm)
cm.on("refresh", drawRulers)
}
});
function drawRulers(cm) {
cm.state.rulerDiv.textContent = ""
var val = cm.getOption("rulers");
var cw = cm.defaultCharWidth();
var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;
cm.state.rulerDiv.style.minHeight = (cm.display.scroller.offsetHeight + 30) + "px";
for (var i = 0; i < val.length; i++) {
var elt = document.createElement("div");
elt.className = "CodeMirror-ruler";
var col, conf = val[i];
if (typeof conf == "number") {
col = conf;
} else {
col = conf.column;
if (conf.className) elt.className += " " + conf.className;
if (conf.color) elt.style.borderColor = conf.color;
if (conf.lineStyle) elt.style.borderLeftStyle = conf.lineStyle;
if (conf.width) elt.style.borderLeftWidth = conf.width;
}
elt.style.left = (left + col * cw) + "px";
cm.state.rulerDiv.appendChild(elt)
}
}
});
================================================
FILE: addon/edit/closebrackets.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
var defaults = {
pairs: "()[]{}''\"\"",
closeBefore: ")]}'\":;>",
triples: "",
explode: "[]{}"
};
var Pos = CodeMirror.Pos;
CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {
if (old && old != CodeMirror.Init) {
cm.removeKeyMap(keyMap);
cm.state.closeBrackets = null;
}
if (val) {
ensureBound(getOption(val, "pairs"))
cm.state.closeBrackets = val;
cm.addKeyMap(keyMap);
}
});
function getOption(conf, name) {
if (name == "pairs" && typeof conf == "string") return conf;
if (typeof conf == "object" && conf[name] != null) return conf[name];
return defaults[name];
}
var keyMap = {Backspace: handleBackspace, Enter: handleEnter};
function ensureBound(chars) {
for (var i = 0; i < chars.length; i++) {
var ch = chars.charAt(i), key = "'" + ch + "'"
if (!keyMap[key]) keyMap[key] = handler(ch)
}
}
ensureBound(defaults.pairs + "`")
function handler(ch) {
return function(cm) { return handleChar(cm, ch); };
}
function getConfig(cm) {
var deflt = cm.state.closeBrackets;
if (!deflt || deflt.override) return deflt;
var mode = cm.getModeAt(cm.getCursor());
return mode.closeBrackets || deflt;
}
function handleBackspace(cm) {
var conf = getConfig(cm);
if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
var pairs = getOption(conf, "pairs");
var ranges = cm.listSelections();
for (var i = 0; i < ranges.length; i++) {
if (!ranges[i].empty()) return CodeMirror.Pass;
var around = charsAround(cm, ranges[i].head);
if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;
}
for (var i = ranges.length - 1; i >= 0; i--) {
var cur = ranges[i].head;
cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete");
}
}
function handleEnter(cm) {
var conf = getConfig(cm);
var explode = conf && getOption(conf, "explode");
if (!explode || cm.getOption("disableInput")) return CodeMirror.Pass;
var ranges = cm.listSelections();
for (var i = 0; i < ranges.length; i++) {
if (!ranges[i].empty()) return CodeMirror.Pass;
var around = charsAround(cm, ranges[i].head);
if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;
}
cm.operation(function() {
var linesep = cm.lineSeparator() || "\n";
cm.replaceSelection(linesep + linesep, null);
moveSel(cm, -1)
ranges = cm.listSelections();
for (var i = 0; i < ranges.length; i++) {
var line = ranges[i].head.line;
cm.indentLine(line, null, true);
cm.indentLine(line + 1, null, true);
}
});
}
function moveSel(cm, dir) {
var newRanges = [], ranges = cm.listSelections(), primary = 0
for (var i = 0; i < ranges.length; i++) {
var range = ranges[i]
if (range.head == cm.getCursor()) primary = i
var pos = range.head.ch || dir > 0 ? {line: range.head.line, ch: range.head.ch + dir} : {line: range.head.line - 1}
newRanges.push({anchor: pos, head: pos})
}
cm.setSelections(newRanges, primary)
}
function contractSelection(sel) {
var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;
return {anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),
head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))};
}
function handleChar(cm, ch) {
var conf = getConfig(cm);
if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
var pairs = getOption(conf, "pairs");
var pos = pairs.indexOf(ch);
if (pos == -1) return CodeMirror.Pass;
var closeBefore = getOption(conf,"closeBefore");
var triples = getOption(conf, "triples");
var identical = pairs.charAt(pos + 1) == ch;
var ranges = cm.listSelections();
var opening = pos % 2 == 0;
var type;
for (var i = 0; i < ranges.length; i++) {
var range = ranges[i], cur = range.head, curType;
var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));
if (opening && !range.empty()) {
curType = "surround";
} else if ((identical || !opening) && next == ch) {
if (identical && stringStartsAfter(cm, cur))
curType = "both";
else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch)
curType = "skipThree";
else
curType = "skip";
} else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 &&
cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch) {
if (cur.ch > 2 && /\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))) return CodeMirror.Pass;
curType = "addFour";
} else if (identical) {
var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur)
if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both";
else return CodeMirror.Pass;
} else if (opening && (next.length === 0 || /\s/.test(next) || closeBefore.indexOf(next) > -1)) {
curType = "both";
} else {
return CodeMirror.Pass;
}
if (!type) type = curType;
else if (type != curType) return CodeMirror.Pass;
}
var left = pos % 2 ? pairs.charAt(pos - 1) : ch;
var right = pos % 2 ? ch : pairs.charAt(pos + 1);
cm.operation(function() {
if (type == "skip") {
moveSel(cm, 1)
} else if (type == "skipThree") {
moveSel(cm, 3)
} else if (type == "surround") {
var sels = cm.getSelections();
for (var i = 0; i < sels.length; i++)
sels[i] = left + sels[i] + right;
cm.replaceSelections(sels, "around");
sels = cm.listSelections().slice();
for (var i = 0; i < sels.length; i++)
sels[i] = contractSelection(sels[i]);
cm.setSelections(sels);
} else if (type == "both") {
cm.replaceSelection(left + right, null);
cm.triggerElectric(left + right);
moveSel(cm, -1)
} else if (type == "addFour") {
cm.replaceSelection(left + left + left + left, "before");
moveSel(cm, 1)
}
});
}
function charsAround(cm, pos) {
var str = cm.getRange(Pos(pos.line, pos.ch - 1),
Pos(pos.line, pos.ch + 1));
return str.length == 2 ? str : null;
}
function stringStartsAfter(cm, pos) {
var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1))
return /\bstring/.test(token.type) && token.start == pos.ch &&
(pos.ch == 0 || !/\bstring/.test(cm.getTokenTypeAt(pos)))
}
});
================================================
FILE: addon/edit/closetag.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
/**
* Tag-closer extension for CodeMirror.
*
* This extension adds an "autoCloseTags" option that can be set to
* either true to get the default behavior, or an object to further
* configure its behavior.
*
* These are supported options:
*
* `whenClosing` (default true)
* Whether to autoclose when the '/' of a closing tag is typed.
* `whenOpening` (default true)
* Whether to autoclose the tag when the final '>' of an opening
* tag is typed.
* `dontCloseTags` (default is empty tags for HTML, none for XML)
* An array of tag names that should not be autoclosed.
* `indentTags` (default is block tags for HTML, none for XML)
* An array of tag names that should, when opened, cause a
* blank line to be added inside the tag, and the blank line and
* closing line to be indented.
* `emptyTags` (default is none)
* An array of XML tag names that should be autoclosed with '/>'.
*
* See demos/closetag.html for a usage example.
*/
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../fold/xml-fold"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../fold/xml-fold"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {
if (old != CodeMirror.Init && old)
cm.removeKeyMap("autoCloseTags");
if (!val) return;
var map = {name: "autoCloseTags"};
if (typeof val != "object" || val.whenClosing !== false)
map["'/'"] = function(cm) { return autoCloseSlash(cm); };
if (typeof val != "object" || val.whenOpening !== false)
map["'>'"] = function(cm) { return autoCloseGT(cm); };
cm.addKeyMap(map);
});
var htmlDontClose = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param",
"source", "track", "wbr"];
var htmlIndent = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4",
"h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];
function autoCloseGT(cm) {
if (cm.getOption("disableInput")) return CodeMirror.Pass;
var ranges = cm.listSelections(), replacements = [];
var opt = cm.getOption("autoCloseTags");
for (var i = 0; i < ranges.length; i++) {
if (!ranges[i].empty()) return CodeMirror.Pass;
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
var tagInfo = inner.mode.xmlCurrentTag && inner.mode.xmlCurrentTag(state)
var tagName = tagInfo && tagInfo.name
if (!tagName) return CodeMirror.Pass
var html = inner.mode.configuration == "html";
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);
var lowerTagName = tagName.toLowerCase();
// Don't process the '>' at the end of an end-tag or self-closing tag
if (!tagName ||
tok.type == "string" && (tok.end != pos.ch || !/[\"\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||
tok.type == "tag" && tagInfo.close ||
tok.string.indexOf("/") == (pos.ch - tok.start - 1) || // match something like <someTagName />
dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||
closingTagExists(cm, inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state) || [], tagName, pos, true))
return CodeMirror.Pass;
var emptyTags = typeof opt == "object" && opt.emptyTags;
if (emptyTags && indexOf(emptyTags, tagName) > -1) {
replacements[i] = { text: "/>", newPos: CodeMirror.Pos(pos.line, pos.ch + 2) };
continue;
}
var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;
replacements[i] = {indent: indent,
text: ">" + (indent ? "\n\n" : "") + "</" + tagName + ">",
newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};
}
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnAutoClose);
for (var i = ranges.length - 1; i >= 0; i--) {
var info = replacements[i];
cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert");
var sel = cm.listSelections().slice(0);
sel[i] = {head: info.newPos, anchor: info.newPos};
cm.setSelections(sel);
if (!dontIndentOnAutoClose && info.indent) {
cm.indentLine(info.newPos.line, null, true);
cm.indentLine(info.newPos.line + 1, null, true);
}
}
}
function autoCloseCurrent(cm, typingSlash) {
var ranges = cm.listSelections(), replacements = [];
var head = typingSlash ? "/" : "</";
var opt = cm.getOption("autoCloseTags");
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnSlash);
for (var i = 0; i < ranges.length; i++) {
if (!ranges[i].empty()) return CodeMirror.Pass;
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
if (typingSlash && (tok.type == "string" || tok.string.charAt(0) != "<" ||
tok.start != pos.ch - 1))
return CodeMirror.Pass;
// Kludge to get around the fact that we are not in XML mode
// when completing in JS/CSS snippet in htmlmixed mode. Does not
// work for other XML embedded languages (there is no general
// way to go from a mixed mode to its current XML state).
var replacement, mixed = inner.mode.name != "xml" && cm.getMode().name == "htmlmixed"
if (mixed && inner.mode.name == "javascript") {
replacement = head + "script";
} else if (mixed && inner.mode.name == "css") {
replacement = head + "style";
} else {
var context = inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state)
var top = context.length ? context[context.length - 1] : ""
if (!context || (context.length && closingTagExists(cm, context, top, pos)))
return CodeMirror.Pass;
replacement = head + top
}
if (cm.getLine(pos.line).charAt(tok.end) != ">") replacement += ">";
replacements[i] = replacement;
}
cm.replaceSelections(replacements);
ranges = cm.listSelections();
if (!dontIndentOnAutoClose) {
for (var i = 0; i < ranges.length; i++)
if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)
cm.indentLine(ranges[i].head.line);
}
}
function autoCloseSlash(cm) {
if (cm.getOption("disableInput")) return CodeMirror.Pass;
return autoCloseCurrent(cm, true);
}
CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };
function indexOf(collection, elt) {
if (collection.indexOf) return collection.indexOf(elt);
for (var i = 0, e = collection.length; i < e; ++i)
if (collection[i] == elt) return i;
return -1;
}
// If xml-fold is loaded, we use its functionality to try and verify
// whether a given tag is actually unclosed.
function closingTagExists(cm, context, tagName, pos, newTag) {
if (!CodeMirror.scanForClosingTag) return false;
var end = Math.min(cm.lastLine() + 1, pos.line + 500);
var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);
if (!nextClose || nextClose.tag != tagName) return false;
// If the immediate wrapping context contains onCx instances of
// the same tag, a closing tag only exists if there are at least
// that many closing tags of that type following.
var onCx = newTag ? 1 : 0
for (var i = context.length - 1; i >= 0; i--) {
if (context[i] == tagName) ++onCx
else break
}
pos = nextClose.to;
for (var i = 1; i < onCx; i++) {
var next = CodeMirror.scanForClosingTag(cm, pos, null, end);
if (!next || next.tag != tagName) return false;
pos = next.to;
}
return true;
}
});
================================================
FILE: addon/edit/continuelist.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,
emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,
unorderedListRE = /[*+-]\s/;
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
if (cm.getOption("disableInput")) return CodeMirror.Pass;
var ranges = cm.listSelections(), replacements = [];
for (var i = 0; i < ranges.length; i++) {
var pos = ranges[i].head;
// If we're not in Markdown mode, fall back to normal newlineAndIndent
var eolState = cm.getStateAfter(pos.line);
var inner = CodeMirror.innerMode(cm.getMode(), eolState);
if (inner.mode.name !== "markdown" && inner.mode.helperType !== "markdown") {
cm.execCommand("newlineAndIndent");
return;
} else {
eolState = inner.state;
}
var inList = eolState.list !== false;
var inQuote = eolState.quote !== 0;
var line = cm.getLine(pos.line), match = listRE.exec(line);
var cursorBeforeBullet = /^\s*$/.test(line.slice(0, pos.ch));
if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {
cm.execCommand("newlineAndIndent");
return;
}
if (emptyListRE.test(line)) {
var endOfQuote = inQuote && />\s*$/.test(line)
var endOfList = !/>\s*$/.test(line)
if (endOfQuote || endOfList) cm.replaceRange("", {
line: pos.line, ch: 0
}, {
line: pos.line, ch: pos.ch + 1
});
replacements[i] = "\n";
} else {
var indent = match[1], after = match[5];
var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace("x", " ");
replacements[i] = "\n" + indent + bullet + after;
if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
}
}
cm.replaceSelections(replacements);
};
// Auto-updating Markdown list numbers when a new item is added to the
// middle of a list
function incrementRemainingMarkdownListNumbers(cm, pos) {
var startLine = pos.line, lookAhead = 0, skipCount = 0;
var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];
do {
lookAhead += 1;
var nextLineNumber = startLine + lookAhead;
var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine);
if (nextItem) {
var nextIndent = nextItem[1];
var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount);
var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber;
if (startIndent === nextIndent && !isNaN(nextNumber)) {
if (newNumber === nextNumber) itemNumber = nextNumber + 1;
if (newNumber > nextNumber) itemNumber = newNumber + 1;
cm.replaceRange(
nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
{
line: nextLineNumber, ch: 0
}, {
line: nextLineNumber, ch: nextLine.length
});
} else {
if (startIndent.length > nextIndent.length) return;
// This doesn't run if the next line immediately indents, as it is
// not clear of the users intention (new indented item or same level)
if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;
skipCount += 1;
}
}
} while (nextItem);
}
});
================================================
FILE: addon/edit/matchbrackets.js
================================================
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
var ie_lt8 = /MSIE \d/.test(navigator.userAgent) &&
(document.documentMode == null || document.documentMode < 8);
var Pos = CodeMirror.Pos;
var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<", "<": ">>", ">": "<<"};
function bracketRegex(config) {
return config && config.bracketRegex || /[(){}[\]]/
}
function findMatchingBracket(cm, where, config) {
var line = cm.getLineHandle(where.line), pos = where.ch - 1;
var afterCursor = config && config.afterCursor
if (afterCursor == null)
afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className)
var re = bracketRegex(config)
// A cursor is defined as between two characters, but in vim command mode
// (i.e. not insert mode), the cursor is visually represented as a
// highlighted box on top of the 2nd character. Otherwise, we allow matches
// from before or after the cursor.
var match = (!afterCursor && pos >= 0 && re.test(line.text.charAt(pos)) && matching[line.text.charAt(pos)]) ||
re.test(line.text.charAt(pos + 1)) && matching[line.text.charAt(++pos)];
if (!match) return null;
var dir = match.charAt(1) == ">" ? 1 : -1;
if (config && config.strict && (dir > 0) != (pos == where.ch)) return null;
var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));
var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style, config);
if (found == null) return null;
return {from: Pos(where.line, pos), to: found && found.pos,
match: found && found.ch == match.charAt(0), forward: dir > 0};
}
// bracketRegex is used to specify which type of bracket to scan
// should be a regexp, e.g. /[[\]]/
//
// Note: If "where" is on an open bracket, then this bracket is ignored.
//
// Returns false when no bracket was found, null when it reached
// maxScanLines and gave up
function scanForBracket(cm, where, dir, style, config) {
var maxScanLen = (config && config.maxScanLineLength) || 10000;
var maxScanLines = (config && config.maxScanLines) || 1000;
var stack = [];
var re = bracketRegex(config)
var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)
: Math.max(cm.firstLine() - 1, where.line - maxScanLines);
for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {
var line = cm.getLine(lineNo);
if (!line) continue;
var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;
if (line.length > maxScanLen) continue;
if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);
for (; pos != end; pos += dir) {
var ch = line.charAt(pos);
if (re.test(ch) && (style === undefined ||
(cm.getTokenTypeAt(Pos(lineNo, pos + 1)) || "") == (style || ""))) {
var match = matching[ch];
if (match && (match.charAt(1) == ">") == (dir > 0)) stack.push(ch);
else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};
else stack.pop();
}
}
}
return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;
}
function matchBrackets(cm, autoclear, config) {
// Disable brace matching in long lines, since it'll cause hugely slow updates
var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000,
highlightNonMatching = config && config.highlightNonMatching;
var marks = [], ranges = cm.listSelections();
for (var i = 0; i < ranges.length; i++) {
var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);
if (match && (match.match || highlightNonMatching !== false) && cm.getLine(match.from.line).length <= maxHighlightLen) {
var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));
if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)
marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));
}
}
if (marks.length) {
// Kludge to work around the IE bug from issue #1193, where text
// input stops going to the textarea whenever this fires.
if (ie_lt8 && cm.state.focused) cm.focus();
var clear = function() {
cm.operation(function() {
for (var i = 0; i < marks.length; i++) marks[i].clear();
});
};
if (autoclear) setTimeout(clear, 800);
else return clear;
}
}
function doMatchBrackets(cm) {
cm.operation(function() {
if (cm.state.matchBrackets.currentlyHighlighted) {
cm.st
gitextract_k6pzpmws/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .npmignore
├── AUTHORS
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── addon/
│ ├── comment/
│ │ ├── comment.js
│ │ └── continuecomment.js
│ ├── dialog/
│ │ ├── dialog.css
│ │ └── dialog.js
│ ├── display/
│ │ ├── autorefresh.js
│ │ ├── fullscreen.css
│ │ ├── fullscreen.js
│ │ ├── panel.js
│ │ ├── placeholder.js
│ │ └── rulers.js
│ ├── edit/
│ │ ├── closebrackets.js
│ │ ├── closetag.js
│ │ ├── continuelist.js
│ │ ├── matchbrackets.js
│ │ ├── matchtags.js
│ │ └── trailingspace.js
│ ├── fold/
│ │ ├── brace-fold.js
│ │ ├── comment-fold.js
│ │ ├── foldcode.js
│ │ ├── foldgutter.css
│ │ ├── foldgutter.js
│ │ ├── indent-fold.js
│ │ ├── markdown-fold.js
│ │ └── xml-fold.js
│ ├── hint/
│ │ ├── anyword-hint.js
│ │ ├── css-hint.js
│ │ ├── html-hint.js
│ │ ├── javascript-hint.js
│ │ ├── show-hint.css
│ │ ├── show-hint.js
│ │ ├── sql-hint.js
│ │ └── xml-hint.js
│ ├── lint/
│ │ ├── coffeescript-lint.js
│ │ ├── css-lint.js
│ │ ├── html-lint.js
│ │ ├── javascript-lint.js
│ │ ├── json-lint.js
│ │ ├── lint.css
│ │ ├── lint.js
│ │ └── yaml-lint.js
│ ├── merge/
│ │ ├── merge.css
│ │ └── merge.js
│ ├── mode/
│ │ ├── loadmode.js
│ │ ├── multiplex.js
│ │ ├── multiplex_test.js
│ │ ├── overlay.js
│ │ └── simple.js
│ ├── runmode/
│ │ ├── colorize.js
│ │ └── runmode.js
│ ├── scroll/
│ │ ├── annotatescrollbar.js
│ │ ├── scrollpastend.js
│ │ ├── simplescrollbars.css
│ │ └── simplescrollbars.js
│ ├── search/
│ │ ├── jump-to-line.js
│ │ ├── match-highlighter.js
│ │ ├── matchesonscrollbar.css
│ │ ├── matchesonscrollbar.js
│ │ ├── search.js
│ │ └── searchcursor.js
│ ├── selection/
│ │ ├── active-line.js
│ │ ├── mark-selection.js
│ │ └── selection-pointer.js
│ ├── tern/
│ │ ├── tern.css
│ │ ├── tern.js
│ │ └── worker.js
│ └── wrap/
│ └── hardwrap.js
├── bin/
│ ├── authors.sh
│ ├── lint
│ ├── release
│ ├── source-highlight
│ └── upload-release.js
├── demo/
│ ├── activeline.html
│ ├── anywordhint.html
│ ├── bidi.html
│ ├── btree.html
│ ├── buffers.html
│ ├── changemode.html
│ ├── closebrackets.html
│ ├── closetag.html
│ ├── complete.html
│ ├── emacs.html
│ ├── folding.html
│ ├── fullscreen.html
│ ├── hardwrap.html
│ ├── html5complete.html
│ ├── indentwrap.html
│ ├── lint.html
│ ├── loadmode.html
│ ├── marker.html
│ ├── markselection.html
│ ├── matchhighlighter.html
│ ├── matchtags.html
│ ├── merge.html
│ ├── multiplex.html
│ ├── mustache.html
│ ├── panel.html
│ ├── placeholder.html
│ ├── preview.html
│ ├── requirejs.html
│ ├── resize.html
│ ├── rulers.html
│ ├── runmode-standalone.html
│ ├── runmode.html
│ ├── search.html
│ ├── simplemode.html
│ ├── simplescrollbars.html
│ ├── spanaffectswrapping_shim.html
│ ├── sublime.html
│ ├── tern.html
│ ├── theme.html
│ ├── trailingspace.html
│ ├── variableheight.html
│ ├── vim.html
│ ├── visibletabs.html
│ ├── widget.html
│ └── xmlcomplete.html
├── doc/
│ ├── activebookmark.js
│ ├── docs.css
│ ├── internals.html
│ ├── manual.html
│ ├── releases.html
│ ├── reporting.html
│ ├── upgrade_v2.2.html
│ ├── upgrade_v3.html
│ └── upgrade_v4.html
├── index.html
├── keymap/
│ ├── emacs.js
│ └── sublime.js
├── lib/
│ └── codemirror.css
├── mode/
│ ├── apl/
│ │ ├── apl.js
│ │ └── index.html
│ ├── asciiarmor/
│ │ ├── asciiarmor.js
│ │ └── index.html
│ ├── asn.1/
│ │ ├── asn.1.js
│ │ └── index.html
│ ├── asterisk/
│ │ ├── asterisk.js
│ │ └── index.html
│ ├── brainfuck/
│ │ ├── brainfuck.js
│ │ └── index.html
│ ├── clike/
│ │ ├── clike.js
│ │ ├── index.html
│ │ ├── scala.html
│ │ └── test.js
│ ├── clojure/
│ │ ├── clojure.js
│ │ ├── index.html
│ │ └── test.js
│ ├── cmake/
│ │ ├── cmake.js
│ │ └── index.html
│ ├── cobol/
│ │ ├── cobol.js
│ │ └── index.html
│ ├── coffeescript/
│ │ ├── coffeescript.js
│ │ └── index.html
│ ├── commonlisp/
│ │ ├── commonlisp.js
│ │ └── index.html
│ ├── crystal/
│ │ ├── crystal.js
│ │ └── index.html
│ ├── css/
│ │ ├── css.js
│ │ ├── gss.html
│ │ ├── gss_test.js
│ │ ├── index.html
│ │ ├── less.html
│ │ ├── less_test.js
│ │ ├── scss.html
│ │ ├── scss_test.js
│ │ └── test.js
│ ├── cypher/
│ │ ├── cypher.js
│ │ ├── index.html
│ │ └── test.js
│ ├── d/
│ │ ├── d.js
│ │ ├── index.html
│ │ └── test.js
│ ├── dart/
│ │ ├── dart.js
│ │ └── index.html
│ ├── diff/
│ │ ├── diff.js
│ │ └── index.html
│ ├── django/
│ │ ├── django.js
│ │ └── index.html
│ ├── dockerfile/
│ │ ├── dockerfile.js
│ │ ├── index.html
│ │ └── test.js
│ ├── dtd/
│ │ ├── dtd.js
│ │ └── index.html
│ ├── dylan/
│ │ ├── dylan.js
│ │ ├── index.html
│ │ └── test.js
│ ├── ebnf/
│ │ ├── ebnf.js
│ │ └── index.html
│ ├── ecl/
│ │ ├── ecl.js
│ │ └── index.html
│ ├── eiffel/
│ │ ├── eiffel.js
│ │ └── index.html
│ ├── elm/
│ │ ├── elm.js
│ │ └── index.html
│ ├── erlang/
│ │ ├── erlang.js
│ │ └── index.html
│ ├── factor/
│ │ ├── factor.js
│ │ └── index.html
│ ├── fcl/
│ │ ├── fcl.js
│ │ └── index.html
│ ├── forth/
│ │ ├── forth.js
│ │ └── index.html
│ ├── fortran/
│ │ ├── fortran.js
│ │ └── index.html
│ ├── gas/
│ │ ├── gas.js
│ │ └── index.html
│ ├── gfm/
│ │ ├── gfm.js
│ │ ├── index.html
│ │ └── test.js
│ ├── gherkin/
│ │ ├── gherkin.js
│ │ └── index.html
│ ├── go/
│ │ ├── go.js
│ │ └── index.html
│ ├── groovy/
│ │ ├── groovy.js
│ │ └── index.html
│ ├── haml/
│ │ ├── haml.js
│ │ ├── index.html
│ │ └── test.js
│ ├── handlebars/
│ │ ├── handlebars.js
│ │ └── index.html
│ ├── haskell/
│ │ ├── haskell.js
│ │ └── index.html
│ ├── haskell-literate/
│ │ ├── haskell-literate.js
│ │ └── index.html
│ ├── haxe/
│ │ ├── haxe.js
│ │ └── index.html
│ ├── htmlembedded/
│ │ ├── htmlembedded.js
│ │ └── index.html
│ ├── htmlmixed/
│ │ ├── htmlmixed.js
│ │ └── index.html
│ ├── http/
│ │ ├── http.js
│ │ └── index.html
│ ├── idl/
│ │ ├── idl.js
│ │ └── index.html
│ ├── index.html
│ ├── javascript/
│ │ ├── index.html
│ │ ├── javascript.js
│ │ ├── json-ld.html
│ │ ├── test.js
│ │ └── typescript.html
│ ├── jinja2/
│ │ ├── index.html
│ │ └── jinja2.js
│ ├── jsx/
│ │ ├── index.html
│ │ ├── jsx.js
│ │ └── test.js
│ ├── julia/
│ │ ├── index.html
│ │ └── julia.js
│ ├── livescript/
│ │ ├── index.html
│ │ └── livescript.js
│ ├── lua/
│ │ ├── index.html
│ │ └── lua.js
│ ├── markdown/
│ │ ├── index.html
│ │ ├── markdown.js
│ │ └── test.js
│ ├── mathematica/
│ │ ├── index.html
│ │ └── mathematica.js
│ ├── mbox/
│ │ ├── index.html
│ │ └── mbox.js
│ ├── meta.js
│ ├── mirc/
│ │ ├── index.html
│ │ └── mirc.js
│ ├── mllike/
│ │ ├── index.html
│ │ └── mllike.js
│ ├── modelica/
│ │ ├── index.html
│ │ └── modelica.js
│ ├── mscgen/
│ │ ├── index.html
│ │ ├── mscgen.js
│ │ ├── mscgen_test.js
│ │ ├── msgenny_test.js
│ │ └── xu_test.js
│ ├── mumps/
│ │ ├── index.html
│ │ └── mumps.js
│ ├── nginx/
│ │ ├── index.html
│ │ └── nginx.js
│ ├── nsis/
│ │ ├── index.html
│ │ └── nsis.js
│ ├── ntriples/
│ │ ├── index.html
│ │ └── ntriples.js
│ ├── octave/
│ │ ├── index.html
│ │ └── octave.js
│ ├── oz/
│ │ ├── index.html
│ │ └── oz.js
│ ├── pascal/
│ │ ├── index.html
│ │ └── pascal.js
│ ├── pegjs/
│ │ ├── index.html
│ │ └── pegjs.js
│ ├── perl/
│ │ ├── index.html
│ │ └── perl.js
│ ├── php/
│ │ ├── index.html
│ │ ├── php.js
│ │ └── test.js
│ ├── pig/
│ │ ├── index.html
│ │ └── pig.js
│ ├── powershell/
│ │ ├── index.html
│ │ ├── powershell.js
│ │ └── test.js
│ ├── properties/
│ │ ├── index.html
│ │ └── properties.js
│ ├── protobuf/
│ │ ├── index.html
│ │ └── protobuf.js
│ ├── pug/
│ │ ├── index.html
│ │ └── pug.js
│ ├── puppet/
│ │ ├── index.html
│ │ └── puppet.js
│ ├── python/
│ │ ├── index.html
│ │ ├── python.js
│ │ └── test.js
│ ├── q/
│ │ ├── index.html
│ │ └── q.js
│ ├── r/
│ │ ├── index.html
│ │ └── r.js
│ ├── rpm/
│ │ ├── changes/
│ │ │ └── index.html
│ │ ├── index.html
│ │ └── rpm.js
│ ├── rst/
│ │ ├── index.html
│ │ └── rst.js
│ ├── ruby/
│ │ ├── index.html
│ │ ├── ruby.js
│ │ └── test.js
│ ├── rust/
│ │ ├── index.html
│ │ ├── rust.js
│ │ └── test.js
│ ├── sas/
│ │ ├── index.html
│ │ └── sas.js
│ ├── sass/
│ │ ├── index.html
│ │ ├── sass.js
│ │ └── test.js
│ ├── scheme/
│ │ ├── index.html
│ │ └── scheme.js
│ ├── shell/
│ │ ├── index.html
│ │ ├── shell.js
│ │ └── test.js
│ ├── sieve/
│ │ ├── index.html
│ │ └── sieve.js
│ ├── slim/
│ │ ├── index.html
│ │ ├── slim.js
│ │ └── test.js
│ ├── smalltalk/
│ │ ├── index.html
│ │ └── smalltalk.js
│ ├── smarty/
│ │ ├── index.html
│ │ └── smarty.js
│ ├── solr/
│ │ ├── index.html
│ │ └── solr.js
│ ├── soy/
│ │ ├── index.html
│ │ ├── soy.js
│ │ └── test.js
│ ├── sparql/
│ │ ├── index.html
│ │ └── sparql.js
│ ├── spreadsheet/
│ │ ├── index.html
│ │ └── spreadsheet.js
│ ├── sql/
│ │ ├── index.html
│ │ └── sql.js
│ ├── stex/
│ │ ├── index.html
│ │ ├── stex.js
│ │ └── test.js
│ ├── stylus/
│ │ ├── index.html
│ │ └── stylus.js
│ ├── swift/
│ │ ├── index.html
│ │ ├── swift.js
│ │ └── test.js
│ ├── tcl/
│ │ ├── index.html
│ │ └── tcl.js
│ ├── textile/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── textile.js
│ ├── tiddlywiki/
│ │ ├── index.html
│ │ ├── tiddlywiki.css
│ │ └── tiddlywiki.js
│ ├── tiki/
│ │ ├── index.html
│ │ ├── tiki.css
│ │ └── tiki.js
│ ├── toml/
│ │ ├── index.html
│ │ └── toml.js
│ ├── tornado/
│ │ ├── index.html
│ │ └── tornado.js
│ ├── troff/
│ │ ├── index.html
│ │ └── troff.js
│ ├── ttcn/
│ │ ├── index.html
│ │ └── ttcn.js
│ ├── ttcn-cfg/
│ │ ├── index.html
│ │ └── ttcn-cfg.js
│ ├── turtle/
│ │ ├── index.html
│ │ └── turtle.js
│ ├── twig/
│ │ ├── index.html
│ │ └── twig.js
│ ├── vb/
│ │ ├── index.html
│ │ └── vb.js
│ ├── vbscript/
│ │ ├── index.html
│ │ └── vbscript.js
│ ├── velocity/
│ │ ├── index.html
│ │ └── velocity.js
│ ├── verilog/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── verilog.js
│ ├── vhdl/
│ │ ├── index.html
│ │ └── vhdl.js
│ ├── vue/
│ │ ├── index.html
│ │ └── vue.js
│ ├── wast/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── wast.js
│ ├── webidl/
│ │ ├── index.html
│ │ └── webidl.js
│ ├── xml/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── xml.js
│ ├── xquery/
│ │ ├── index.html
│ │ ├── test.js
│ │ └── xquery.js
│ ├── yacas/
│ │ ├── index.html
│ │ └── yacas.js
│ ├── yaml/
│ │ ├── index.html
│ │ └── yaml.js
│ ├── yaml-frontmatter/
│ │ ├── index.html
│ │ └── yaml-frontmatter.js
│ └── z80/
│ ├── index.html
│ └── z80.js
├── package.json
├── rollup.config.js
├── src/
│ ├── addon/
│ │ └── runmode/
│ │ ├── codemirror-standalone.js
│ │ ├── codemirror.node.js
│ │ ├── runmode-standalone.js
│ │ └── runmode.node.js
│ ├── codemirror.js
│ ├── display/
│ │ ├── Display.js
│ │ ├── focus.js
│ │ ├── gutters.js
│ │ ├── highlight_worker.js
│ │ ├── line_numbers.js
│ │ ├── mode_state.js
│ │ ├── operations.js
│ │ ├── scroll_events.js
│ │ ├── scrollbars.js
│ │ ├── scrolling.js
│ │ ├── selection.js
│ │ ├── update_display.js
│ │ ├── update_line.js
│ │ ├── update_lines.js
│ │ └── view_tracking.js
│ ├── edit/
│ │ ├── CodeMirror.js
│ │ ├── commands.js
│ │ ├── deleteNearSelection.js
│ │ ├── drop_events.js
│ │ ├── fromTextArea.js
│ │ ├── global_events.js
│ │ ├── key_events.js
│ │ ├── legacy.js
│ │ ├── main.js
│ │ ├── methods.js
│ │ ├── mouse_events.js
│ │ ├── options.js
│ │ └── utils.js
│ ├── input/
│ │ ├── ContentEditableInput.js
│ │ ├── TextareaInput.js
│ │ ├── indent.js
│ │ ├── input.js
│ │ ├── keymap.js
│ │ ├── keynames.js
│ │ └── movement.js
│ ├── line/
│ │ ├── highlight.js
│ │ ├── line_data.js
│ │ ├── pos.js
│ │ ├── saw_special_spans.js
│ │ ├── spans.js
│ │ └── utils_line.js
│ ├── measurement/
│ │ ├── position_measurement.js
│ │ └── widgets.js
│ ├── model/
│ │ ├── Doc.js
│ │ ├── change_measurement.js
│ │ ├── changes.js
│ │ ├── chunk.js
│ │ ├── document_data.js
│ │ ├── history.js
│ │ ├── line_widget.js
│ │ ├── mark_text.js
│ │ ├── selection.js
│ │ └── selection_updates.js
│ ├── modes.js
│ └── util/
│ ├── StringStream.js
│ ├── bidi.js
│ ├── browser.js
│ ├── dom.js
│ ├── event.js
│ ├── feature_detection.js
│ ├── misc.js
│ └── operation_group.js
├── test/
│ ├── annotatescrollbar.js
│ ├── comment_test.js
│ ├── contenteditable_test.js
│ ├── doc_test.js
│ ├── driver.js
│ ├── emacs_test.js
│ ├── html-hint-test.js
│ ├── index.html
│ ├── lint.js
│ ├── mode_test.css
│ ├── mode_test.js
│ ├── multi_test.js
│ ├── run.js
│ ├── scroll_test.js
│ ├── search_test.js
│ ├── sql-hint-test.js
│ ├── sublime_test.js
│ └── test.js
└── theme/
├── 3024-day.css
├── 3024-night.css
├── abbott.css
├── abcdef.css
├── ambiance-mobile.css
├── ambiance.css
├── ayu-dark.css
├── ayu-mirage.css
├── base16-dark.css
├── base16-light.css
├── bespin.css
├── blackboard.css
├── cobalt.css
├── colorforth.css
├── darcula.css
├── dracula.css
├── duotone-dark.css
├── duotone-light.css
├── eclipse.css
├── elegant.css
├── erlang-dark.css
├── gruvbox-dark.css
├── hopscotch.css
├── icecoder.css
├── idea.css
├── isotope.css
├── juejin.css
├── lesser-dark.css
├── liquibyte.css
├── lucario.css
├── material-darker.css
├── material-ocean.css
├── material-palenight.css
├── material.css
├── mbo.css
├── mdn-like.css
├── midnight.css
├── monokai.css
├── moxer.css
├── neat.css
├── neo.css
├── night.css
├── nord.css
├── oceanic-next.css
├── panda-syntax.css
├── paraiso-dark.css
├── paraiso-light.css
├── pastel-on-dark.css
├── railscasts.css
├── rubyblue.css
├── seti.css
├── shadowfox.css
├── solarized.css
├── ssms.css
├── the-matrix.css
├── tomorrow-night-bright.css
├── tomorrow-night-eighties.css
├── ttcn.css
├── twilight.css
├── vibrant-ink.css
├── xq-dark.css
├── xq-light.css
├── yeti.css
├── yonce.css
└── zenburn.css
SYMBOL INDEX (1892 symbols across 256 files)
FILE: addon/comment/comment.js
function firstNonWS (line 18) | function firstNonWS(str) {
function probablyInsideString (line 48) | function probablyInsideString(cm, pos, line) {
function getMode (line 52) | function getMode(cm, pos) {
FILE: addon/comment/continuecomment.js
function continueComment (line 14) | function continueComment(cm) {
function nonspaceAfter (line 87) | function nonspaceAfter(ch, str) {
function continueLineCommentEnabled (line 93) | function continueLineCommentEnabled(cm) {
FILE: addon/dialog/dialog.js
function dialogDiv (line 14) | function dialogDiv(cm, template, bottom) {
function closeNotification (line 32) | function closeNotification(cm, newVal) {
function close (line 45) | function close(newVal) {
function close (line 106) | function close() {
function close (line 145) | function close() {
FILE: addon/display/autorefresh.js
function startListening (line 23) | function startListening(cm, state) {
function stopListening (line 42) | function stopListening(_cm, state) {
FILE: addon/display/fullscreen.js
function setFullscreen (line 21) | function setFullscreen(cm) {
function setNormal (line 32) | function setNormal(cm) {
FILE: addon/display/panel.js
function Panel (line 51) | function Panel(cm, node, options, height) {
function initPanels (line 78) | function initPanels(cm) {
function removePanels (line 114) | function removePanels(cm) {
function isAtTop (line 128) | function isAtTop(cm, dom) {
FILE: addon/display/placeholder.js
function clearPlaceholder (line 33) | function clearPlaceholder(cm) {
function setPlaceholder (line 39) | function setPlaceholder(cm) {
function onComposition (line 51) | function onComposition(cm) {
function onBlur (line 64) | function onBlur(cm) {
function onChange (line 67) | function onChange(cm) {
function isEmpty (line 75) | function isEmpty(cm) {
FILE: addon/display/rulers.js
function drawRulers (line 28) | function drawRulers(cm) {
FILE: addon/edit/closebrackets.js
function getOption (line 33) | function getOption(conf, name) {
function ensureBound (line 40) | function ensureBound(chars) {
function handler (line 48) | function handler(ch) {
function getConfig (line 52) | function getConfig(cm) {
function handleBackspace (line 59) | function handleBackspace(cm) {
function handleEnter (line 76) | function handleEnter(cm) {
function moveSel (line 100) | function moveSel(cm, dir) {
function contractSelection (line 111) | function contractSelection(sel) {
function handleChar (line 117) | function handleChar(cm, ch) {
function charsAround (line 190) | function charsAround(cm, pos) {
function stringStartsAfter (line 196) | function stringStartsAfter(cm, pos) {
FILE: addon/edit/closetag.js
function autoCloseGT (line 55) | function autoCloseGT(cm) {
function autoCloseCurrent (line 108) | function autoCloseCurrent(cm, typingSlash) {
function autoCloseSlash (line 148) | function autoCloseSlash(cm) {
function indexOf (line 155) | function indexOf(collection, elt) {
function closingTagExists (line 164) | function closingTagExists(cm, context, tagName, pos, newTag) {
FILE: addon/edit/continuelist.js
function incrementRemainingMarkdownListNumbers (line 67) | function incrementRemainingMarkdownListNumbers(cm, pos) {
FILE: addon/edit/matchbrackets.js
function bracketRegex (line 19) | function bracketRegex(config) {
function findMatchingBracket (line 23) | function findMatchingBracket(cm, where, config) {
function scanForBracket (line 54) | function scanForBracket(cm, where, dir, style, config) {
function matchBrackets (line 82) | function matchBrackets(cm, autoclear, config) {
function doMatchBrackets (line 112) | function doMatchBrackets(cm) {
function clearHighlighted (line 122) | function clearHighlighted(cm) {
FILE: addon/edit/matchtags.js
function clear (line 28) | function clear(cm) {
function doMatchTags (line 34) | function doMatchTags(cm) {
function maybeUpdateMatch (line 55) | function maybeUpdateMatch(cm) {
FILE: addon/fold/brace-fold.js
function bracketFolding (line 14) | function bracketFolding(pairs) {
function hasImport (line 77) | function hasImport(line) {
function hasInclude (line 101) | function hasInclude(line) {
FILE: addon/fold/foldcode.js
function doFold (line 14) | function doFold(cm, pos, options, force) {
function makeWidget (line 63) | function makeWidget(cm, options, range) {
function getOption (line 147) | function getOption(cm, options, name) {
FILE: addon/fold/foldgutter.js
function State (line 41) | function State(options) {
function parseOptions (line 46) | function parseOptions(opts) {
function isFolded (line 54) | function isFolded(cm, line) {
function marker (line 65) | function marker(spec) {
function updateFoldInfo (line 75) | function updateFoldInfo(cm, from, to) {
function classTest (line 104) | function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)...
function updateInViewport (line 106) | function updateInViewport(cm) {
function onGutterClick (line 115) | function onGutterClick(cm, line, gutter) {
function optionChange (line 125) | function optionChange(cm, option) {
function onChange (line 129) | function onChange(cm) {
function onViewportChange (line 138) | function onViewportChange(cm) {
function onFold (line 162) | function onFold(cm, from) {
FILE: addon/fold/indent-fold.js
function lineIndent (line 14) | function lineIndent(cm, lineNo) {
FILE: addon/fold/markdown-fold.js
function isHeader (line 17) | function isHeader(lineNo) {
function headerLevel (line 22) | function headerLevel(lineNo, line, nextLine) {
FILE: addon/fold/xml-fold.js
function cmp (line 15) | function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
function Iter (line 21) | function Iter(cm, line, ch, range) {
function tagAt (line 28) | function tagAt(iter, ch) {
function nextLine (line 33) | function nextLine(iter) {
function prevLine (line 39) | function prevLine(iter) {
function toTagEnd (line 46) | function toTagEnd(iter) {
function toTagStart (line 57) | function toTagStart(iter) {
function toNextTag (line 69) | function toNextTag(iter) {
function toPrevTag (line 79) | function toPrevTag(iter) {
function findMatchingClose (line 91) | function findMatchingClose(iter, tag) {
function findMatchingOpen (line 112) | function findMatchingOpen(iter, tag) {
FILE: addon/hint/css-hint.js
function add (line 41) | function add(keywords) {
FILE: addon/hint/html-hint.js
function populate (line 335) | function populate(obj) {
function htmlHint (line 345) | function htmlHint(cm, options) {
FILE: addon/hint/javascript-hint.js
function forEach (line 14) | function forEach(arr, f) {
function arrayContains (line 18) | function arrayContains(arr, item) {
function scriptHint (line 31) | function scriptHint(editor, keywords, getToken, options) {
function javascriptHint (line 62) | function javascriptHint(editor, options) {
function getCoffeeScriptToken (line 69) | function getCoffeeScriptToken(editor, cur) {
function coffeescriptHint (line 87) | function coffeescriptHint(editor, options) {
function forAllProps (line 102) | function forAllProps(obj, callback) {
function getCompletions (line 111) | function getCompletions(token, context, keywords, options) {
FILE: addon/hint/show-hint.js
function Completion (line 55) | function Completion(cm, options) {
function parseOptions (line 159) | function parseOptions(cm, pos, options) {
function getText (line 171) | function getText(completion) {
function buildKeyMap (line 176) | function buildKeyMap(completion, handle) {
function getHintElement (line 219) | function getHintElement(hintsElement, el) {
function Widget (line 226) | function Widget(completion, data) {
function applicableHelpers (line 437) | function applicableHelpers(cm, helpers) {
function fetchHints (line 445) | function fetchHints(hint, cm, options, callback) {
function resolveAutoHints (line 455) | function resolveAutoHints(cm, pos) {
FILE: addon/hint/sql-hint.js
function isArray (line 24) | function isArray(val) { return Object.prototype.toString.call(val) == "[...
function getModeConf (line 26) | function getModeConf(editor, field) {
function getKeywords (line 30) | function getKeywords(editor) {
function getIdentifierQuote (line 34) | function getIdentifierQuote(editor) {
function getText (line 38) | function getText(item) {
function wrapTable (line 42) | function wrapTable(name, value) {
function parseTables (line 48) | function parseTables(input) {
function getTable (line 62) | function getTable(name) {
function shallowClone (line 66) | function shallowClone(object) {
function match (line 73) | function match(string, word) {
function addMatches (line 79) | function addMatches(result, search, wordlist, formatter) {
function cleanName (line 95) | function cleanName(name) {
function insertIdentifierQuotes (line 108) | function insertIdentifierQuotes(name) {
function nameCompletion (line 122) | function nameCompletion(cur, token, result, editor) {
function eachWord (line 187) | function eachWord(lineText, f) {
function findTableByAlias (line 193) | function findTableByAlias(alias, editor) {
FILE: addon/hint/xml-hint.js
function matches (line 16) | function matches(hint, typed, matchInMiddle) {
function getHints (line 21) | function getHints(cm, options) {
FILE: addon/lint/javascript-lint.js
function validator (line 17) | function validator(text, options) {
function parseErrors (line 34) | function parseErrors(errors, output) {
FILE: addon/lint/lint.js
function showTooltip (line 16) | function showTooltip(cm, e, content) {
function rm (line 37) | function rm(elt) {
function hideTooltip (line 40) | function hideTooltip(tt) {
function showTooltipFor (line 47) | function showTooltipFor(cm, e, content, node) {
function LintState (line 64) | function LintState(cm, conf, hasGutter) {
function clearMarks (line 96) | function clearMarks(cm) {
function clearErrorLines (line 105) | function clearErrorLines(cm) {
function makeMarker (line 112) | function makeMarker(cm, labels, severity, multiple, tooltips) {
function getMaxSeverity (line 127) | function getMaxSeverity(a, b) {
function groupByLine (line 132) | function groupByLine(annotations) {
function annotationTooltip (line 141) | function annotationTooltip(ann) {
function lintAsync (line 154) | function lintAsync(cm, getAnnotations) {
function startLinting (line 170) | function startLinting(cm) {
function updateLinting (line 192) | function updateLinting(cm, annotationsNotSorted) {
function onChange (line 231) | function onChange(cm) {
function popupTooltips (line 238) | function popupTooltips(cm, annotations, e) {
function onMouseOver (line 248) | function onMouseOver(cm, e) {
FILE: addon/merge/merge.js
function DiffView (line 18) | function DiffView(mv, type) {
function ensureDiff (line 75) | function ensureDiff(dv) {
function registerUpdate (line 85) | function registerUpdate(dv) {
function registerScroll (line 150) | function registerScroll(dv, otherDv) {
function syncScroll (line 160) | function syncScroll(dv, toOrig) {
function getOffsets (line 206) | function getOffsets(editor, around) {
function setScrollLock (line 213) | function setScrollLock(dv, val, action) {
function removeClass (line 221) | function removeClass(editor, line, classes) {
function clearMarks (line 230) | function clearMarks(editor, arr, classes) {
function updateMarks (line 242) | function updateMarks(editor, diff, state, type, classes) {
function addClass (line 262) | function addClass(editor, lineNr, classes, main, start, end) {
function markChanges (line 272) | function markChanges(editor, diff, type, marks, from, to, classes) {
function makeConnections (line 316) | function makeConnections(dv) {
function getMatchingOrigLine (line 338) | function getMatchingOrigLine(editLine, chunks) {
function alignableFor (line 353) | function alignableFor(cm, chunks, isOrig) {
function mergeAlignable (line 375) | function mergeAlignable(result, origAlignable, chunks, setIndex) {
function findAlignedLines (line 410) | function findAlignedLines(dv, other) {
function alignChunks (line 427) | function alignChunks(dv, force) {
function alignLines (line 463) | function alignLines(cm, cmOffset, lines, aligners) {
function padAbove (line 477) | function padAbove(cm, line, size) {
function drawConnectorsForChunk (line 489) | function drawConnectorsForChunk(dv, chunk, sTopOrig, sTopEdit, w) {
function copyChunk (line 532) | function copyChunk(dv, to, from, chunk) {
function buildGap (line 607) | function buildGap(dv) {
function asString (line 657) | function asString(obj) {
function getDiff (line 664) | function getDiff(a, b, ignoreWhitespace) {
function getChunks (line 681) | function getChunks(diff) {
function endOfLineClean (line 709) | function endOfLineClean(diff, i) {
function startOfLineClean (line 718) | function startOfLineClean(diff, i) {
function chunkBoundariesAround (line 727) | function chunkBoundariesAround(chunks, n, nInEdit) {
function collapseSingle (line 743) | function collapseSingle(cm, from, to) {
function collapseStretch (line 765) | function collapseStretch(size, editors) {
function unclearNearChunks (line 779) | function unclearNearChunks(dv, margin, off, clear) {
function collapseIdenticalStretches (line 789) | function collapseIdenticalStretches(mv, margin) {
function elt (line 813) | function elt(tag, content, className, style) {
function clear (line 822) | function clear(node) {
function attrs (line 827) | function attrs(elt) {
function copyObj (line 832) | function copyObj(obj, target) {
function moveOver (line 838) | function moveOver(pos, str, copy, other) {
function TrackAlignable (line 857) | function TrackAlignable(cm) {
function posMin (line 977) | function posMin(a, b) { return (a.line - b.line || a.ch - b.ch) < 0 ? a ...
function posMax (line 978) | function posMax(a, b) { return (a.line - b.line || a.ch - b.ch) > 0 ? a ...
function posEq (line 979) | function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
function findPrevDiff (line 981) | function findPrevDiff(chunks, start, isOrig) {
function findNextDiff (line 989) | function findNextDiff(chunks, start, isOrig) {
function goNearbyDiff (line 997) | function goNearbyDiff(cm, dir) {
FILE: addon/mode/loadmode.js
function splitCallback (line 15) | function splitCallback(cont, n) {
function ensureDeps (line 19) | function ensureDeps(mode, cont, options) {
FILE: addon/mode/multiplex.js
function indexOf (line 18) | function indexOf(string, pattern, from, returnEnd) {
FILE: addon/mode/multiplex_test.js
function MT (line 22) | function MT(name) {
FILE: addon/mode/simple.js
function ensureState (line 61) | function ensureState(states, name) {
function toRegex (line 66) | function toRegex(val, caret) {
function asToken (line 79) | function asToken(val) {
function Rule (line 89) | function Rule(data, states) {
function tokenFunction (line 96) | function tokenFunction(states, config) {
function cmp (line 158) | function cmp(a, b) {
function enterLocalMode (line 170) | function enterLocalMode(config, state, spec, token) {
function indexOf (line 186) | function indexOf(val, arr) {
function indentFunction (line 190) | function indentFunction(states, meta) {
FILE: addon/runmode/colorize.js
function textContent (line 16) | function textContent(node, out) {
FILE: addon/scroll/annotatescrollbar.js
function Annotation (line 21) | function Annotation(cm, options) {
function getY (line 76) | function getY(pos, top) {
FILE: addon/scroll/scrollpastend.js
function onChange (line 28) | function onChange(cm, change) {
function updateBottomMargin (line 33) | function updateBottomMargin(cm) {
FILE: addon/scroll/simplescrollbars.js
function Bar (line 14) | function Bar(cls, orientation, scroll) {
function SimpleScrollbars (line 96) | function SimpleScrollbars(cls, place, scroll) {
FILE: addon/search/jump-to-line.js
function dialog (line 19) | function dialog(cm, text, shortText, deflt, f) {
function getJumpDialog (line 24) | function getJumpDialog(cm) {
function interpretLine (line 28) | function interpretLine(cm, string) {
FILE: addon/search/match-highlighter.js
function State (line 42) | function State(options) {
function cursorActivity (line 71) | function cursorActivity(cm) {
function onFocus (line 76) | function onFocus(cm) {
function scheduleHighlight (line 84) | function scheduleHighlight(cm, state) {
function addOverlay (line 89) | function addOverlay(cm, query, hasBoundary, style) {
function removeOverlay (line 101) | function removeOverlay(cm) {
function highlightMatches (line 113) | function highlightMatches(cm) {
function isWord (line 136) | function isWord(cm, from, to) {
function boundariesAround (line 153) | function boundariesAround(stream, re) {
function makeOverlay (line 158) | function makeOverlay(query, hasBoundary, style) {
FILE: addon/search/matchesonscrollbar.js
function SearchAnnotation (line 20) | function SearchAnnotation(cm, query, caseFold, options) {
function offsetLine (line 60) | function offsetLine(line, changeStart, sizeChange) {
FILE: addon/search/search.js
function searchOverlay (line 25) | function searchOverlay(query, caseInsensitive) {
function SearchState (line 45) | function SearchState() {
function getSearchState (line 50) | function getSearchState(cm) {
function queryCaseInsensitive (line 54) | function queryCaseInsensitive(query) {
function getSearchCursor (line 58) | function getSearchCursor(cm, query, pos) {
function persistentDialog (line 63) | function persistentDialog(cm, text, deflt, onEnter, onKeyDown) {
function dialog (line 74) | function dialog(cm, text, shortText, deflt, f) {
function confirmDialog (line 79) | function confirmDialog(cm, text, shortText, fs) {
function parseString (line 84) | function parseString(string) {
function parseQuery (line 94) | function parseQuery(query) {
function startSearch (line 107) | function startSearch(cm, state, query) {
function doSearch (line 119) | function doSearch(cm, rev, persistent, immediate) {
function findNext (line 170) | function findNext(cm, rev, callback) {cm.operation(function() {
function clearSearch (line 183) | function clearSearch(cm) {cm.operation(function() {
function el (line 192) | function el(tag, attrs) {
function getQueryDialog (line 204) | function getQueryDialog(cm) {
function getReplaceQueryDialog (line 214) | function getReplaceQueryDialog(cm) {
function getReplacementQueryDialog (line 220) | function getReplacementQueryDialog(cm) {
function getDoReplaceConfirm (line 225) | function getDoReplaceConfirm(cm) {
function replaceAll (line 234) | function replaceAll(cm, query, text) {
function replace (line 245) | function replace(cm, all) {
FILE: addon/search/searchcursor.js
function regexpFlags (line 15) | function regexpFlags(regexp) {
function ensureFlags (line 22) | function ensureFlags(regexp, flags) {
function maybeMultiline (line 29) | function maybeMultiline(regexp) {
function searchRegexpForward (line 33) | function searchRegexpForward(doc, regexp, start) {
function searchRegexpForwardMultiline (line 45) | function searchRegexpForwardMultiline(doc, regexp, start) {
function lastMatchIn (line 75) | function lastMatchIn(string, regexp, endMargin) {
function searchRegexpBackward (line 90) | function searchRegexpBackward(doc, regexp, start) {
function searchRegexpBackwardMultiline (line 102) | function searchRegexpBackwardMultiline(doc, regexp, start) {
function adjustPos (line 136) | function adjustPos(orig, folded, pos, foldFunc) {
function searchStringForward (line 148) | function searchStringForward(doc, query, start, caseFold) {
function searchStringBackward (line 176) | function searchStringBackward(doc, query, start, caseFold) {
function SearchCursor (line 203) | function SearchCursor(doc, query, pos, options) {
FILE: addon/selection/active-line.js
function clearActiveLines (line 32) | function clearActiveLines(cm) {
function sameArray (line 40) | function sameArray(a, b) {
function updateActiveLines (line 47) | function updateActiveLines(cm, ranges) {
function selectionChange (line 69) | function selectionChange(cm, sel) {
FILE: addon/selection/mark-selection.js
function onCursorActivity (line 36) | function onCursorActivity(cm) {
function onChange (line 41) | function onChange(cm) {
function coverRange (line 50) | function coverRange(cm, from, to, addAt) {
function clear (line 66) | function clear(cm) {
function reset (line 72) | function reset(cm) {
function update (line 79) | function update(cm) {
FILE: addon/selection/selection-pointer.js
function mousemove (line 43) | function mousemove(cm, event) {
function mouseout (line 54) | function mouseout(cm, event) {
function reset (line 62) | function reset(cm) {
function scheduleUpdate (line 67) | function scheduleUpdate(cm) {
function update (line 77) | function update(cm) {
FILE: addon/tern/tern.js
function getFile (line 150) | function getFile(ts, name, c) {
function findDoc (line 160) | function findDoc(ts, doc, name) {
function resolveDoc (line 172) | function resolveDoc(ts, id) {
function trackChange (line 178) | function trackChange(ts, doc, change) {
function sendDoc (line 198) | function sendDoc(ts, doc) {
function hint (line 207) | function hint(ts, cm, c) {
function typeToIcon (line 241) | function typeToIcon(type) {
function showContextInfo (line 253) | function showContextInfo(ts, cm, pos, queryName, c) {
function updateArgHints (line 276) | function updateArgHints(ts, cm) {
function showArgHints (line 318) | function showArgHints(ts, cm, pos) {
function parseFnType (line 343) | function parseFnType(text) {
function jumpToDef (line 376) | function jumpToDef(ts, cm) {
function jumpBack (line 404) | function jumpBack(ts, cm) {
function moveTo (line 410) | function moveTo(ts, curDoc, doc, start, end) {
function findContext (line 419) | function findContext(doc, data) {
function atInterestingExpression (line 449) | function atInterestingExpression(cm) {
function rename (line 457) | function rename(ts, cm) {
function selectName (line 468) | function selectName(ts, cm) {
function applyChanges (line 487) | function applyChanges(ts, changes) {
function buildRequest (line 507) | function buildRequest(ts, doc, query, pos) {
function getFragmentAround (line 549) | function getFragmentAround(data, start, end) {
function elt (line 580) | function elt(tagname, cls /*, ... elts*/) {
function dialog (line 591) | function dialog(cm, text, f) {
function tempTooltip (line 606) | function tempTooltip(cm, content, ts) {
function onEditorActivity (line 632) | function onEditorActivity(cm, f) {
function makeTooltip (line 645) | function makeTooltip(x, y, content, cm, className) {
function remove (line 686) | function remove(node) {
function fadeOut (line 691) | function fadeOut(tooltip) {
function showError (line 696) | function showError(ts, cm, msg) {
function closeArgHints (line 703) | function closeArgHints(ts) {
function docValue (line 711) | function docValue(ts, doc) {
function WorkerServer (line 719) | function WorkerServer(ts) {
FILE: addon/tern/worker.js
function getFile (line 26) | function getFile(file, c) {
function startServer (line 31) | function startServer(defs, plugins, scripts) {
FILE: addon/wrap/hardwrap.js
function findParagraph (line 16) | function findParagraph(cm, pos, options) {
function findBreakPoint (line 32) | function findBreakPoint(text, column, wrapOn, killTrailingSpace, forceBr...
function wrapRange (line 55) | function wrapRange(cm, from, to, options) {
FILE: bin/upload-release.js
function post (line 12) | function post(host, path, body) {
FILE: doc/activebookmark.js
function updateSoon (line 9) | function updateSoon() {
function update (line 16) | function update() {
FILE: keymap/emacs.js
function posEq (line 16) | function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
function addToRing (line 21) | function addToRing(str) {
function growRingTop (line 25) | function growRingTop(str) {
function getFromRing (line 29) | function getFromRing(n) { return killRing[killRing.length - (n ? Math.mi...
function popFromRing (line 30) | function popFromRing() { if (killRing.length > 1) killRing.pop(); return...
function _kill (line 35) | function _kill(cm, from, to, ring, text) {
function byChar (line 50) | function byChar(cm, pos, dir) {
function byWord (line 54) | function byWord(cm, pos, dir) {
function byLine (line 58) | function byLine(cm, pos, dir) {
function byPage (line 62) | function byPage(cm, pos, dir) {
function byParagraph (line 66) | function byParagraph(cm, pos, dir) {
function bySentence (line 81) | function bySentence(cm, pos, dir) {
function byExpr (line 100) | function byExpr(cm, pos, dir) {
function getPrefix (line 121) | function getPrefix(cm, precise) {
function repeated (line 128) | function repeated(cmd) {
function findEnd (line 137) | function findEnd(cm, pos, by, dir) {
function move (line 148) | function move(by, dir) {
function killTo (line 156) | function killTo(cm, by, dir, ring) {
function _killRegion (line 165) | function _killRegion(cm, ring) {
function addPrefix (line 177) | function addPrefix(cm, digit) {
function maybeClearPrefix (line 190) | function maybeClearPrefix(cm, arg) {
function clearPrefix (line 195) | function clearPrefix(cm) {
function maybeDuplicateInput (line 201) | function maybeDuplicateInput(cm, event) {
function maybeRemovePrefixMap (line 210) | function maybeRemovePrefixMap(cm, arg) {
function clearMark (line 226) | function clearMark(cm) {
function makePrompt (line 231) | function makePrompt(msg) {
function getInput (line 241) | function getInput(cm, msg, f) {
function operateOnWord (line 248) | function operateOnWord(cm, op) {
function toEnclosingExpr (line 254) | function toEnclosingExpr(cm) {
function regPrefix (line 538) | function regPrefix(d) {
FILE: keymap/sublime.js
function findPosSubword (line 21) | function findPosSubword(doc, start, dir) {
function moveSubword (line 47) | function moveSubword(cm, dir) {
function insertLine (line 105) | function insertLine(cm, above) {
function wordAt (line 127) | function wordAt(cm, pos) {
function addCursorToSelection (line 169) | function addCursorToSelection(cm, dir) {
function isSelectedRange (line 190) | function isSelectedRange(ranges, from, to) {
function selectBetweenBrackets (line 198) | function selectBetweenBrackets(cm) {
function puncType (line 231) | function puncType(type) {
function sortLines (line 342) | function sortLines(cm, caseSensitive, direction) {
function modifyWordOrSelection (line 446) | function modifyWordOrSelection(cm, mod) {
function getTarget (line 544) | function getTarget(cm) {
function findAndGoTo (line 555) | function findAndGoTo(cm, forward) {
FILE: mode/asciiarmor/asciiarmor.js
function errorIfNotEmpty (line 14) | function errorIfNotEmpty(stream) {
FILE: mode/asn.1/asn.1.js
function tokenBase (line 29) | function tokenBase(stream, state) {
function tokenString (line 68) | function tokenString(quote) {
function Context (line 90) | function Context(indented, column, type, align, prev) {
function pushContext (line 97) | function pushContext(state, col, type) {
function popContext (line 103) | function popContext(state) {
function words (line 162) | function words(str) {
FILE: mode/asterisk/asterisk.js
function basicToken (line 66) | function basicToken(stream,state){
FILE: mode/clike/clike.js
function Context (line 14) | function Context(indented, column, type, info, align, prev) {
function pushContext (line 22) | function pushContext(state, col, type, info) {
function popContext (line 28) | function popContext(state) {
function typeBefore (line 35) | function typeBefore(stream, state, pos) {
function isTopScope (line 41) | function isTopScope(context) {
function tokenBase (line 75) | function tokenBase(stream, state) {
function tokenString (line 128) | function tokenString(quote) {
function tokenComment (line 141) | function tokenComment(stream, state) {
function maybeEOL (line 153) | function maybeEOL(stream, state) {
function words (line 258) | function words(str) {
function contains (line 263) | function contains(words, word) {
function cTypes (line 306) | function cTypes(identifier) {
function objCTypes (line 311) | function objCTypes(identifier) {
function cppHook (line 318) | function cppHook(stream, state) {
function pointerHook (line 333) | function pointerHook(_stream, state) {
function cIsReservedIdentifier (line 340) | function cIsReservedIdentifier(token) {
function cpp14Literal (line 346) | function cpp14Literal(stream) {
function cpp11StringHook (line 351) | function cpp11StringHook(stream, state) {
function cppLooksLikeConstructor (line 375) | function cppLooksLikeConstructor(word) {
function tokenAtString (line 381) | function tokenAtString(stream, state) {
function tokenRawString (line 394) | function tokenRawString(stream, state) {
function def (line 405) | function def(mimes, mode) {
function tokenTripleString (line 541) | function tokenTripleString(stream, state) {
function tokenNestedComment (line 553) | function tokenNestedComment(depth) {
function tokenKotlinString (line 640) | function tokenKotlinString(tripleString){
function tokenCeylonString (line 863) | function tokenCeylonString(type) {
FILE: mode/clike/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
function MTCPP (line 70) | function MTCPP(name) { test.mode(name, mode_cpp, Array.prototype.slice.c...
function MTOBJC (line 89) | function MTOBJC(name) { test.mode(name, mode_objc, Array.prototype.slice...
function MTSCALA (line 131) | function MTSCALA(name) { test.mode("scala_" + name, mode_scala, Array.pr...
function MTJAVA (line 140) | function MTJAVA(name) { test.mode("java_" + name, mode_java, Array.proto...
FILE: mode/clojure/clojure.js
function base (line 168) | function base(stream, state) {
function inString (line 197) | function inString(stream, state) {
function inComment (line 208) | function inComment(stream, state) {
function createLookupMap (line 225) | function createLookupMap(words) {
function is (line 233) | function is(value, test) {
FILE: mode/clojure/test.js
function MT (line 7) | function MT(name) {
function testFormsThatHaveBodyParameter (line 363) | function testFormsThatHaveBodyParameter(forms) {
function typeTokenPairs (line 381) | function typeTokenPairs(type, tokens) {
FILE: mode/cmake/cmake.js
function tokenString (line 17) | function tokenString(stream, state) {
function tokenize (line 37) | function tokenize(stream, state) {
FILE: mode/cobol/cobol.js
function makeKeywords (line 22) | function makeKeywords(str) {
function isNumber (line 150) | function isNumber(ch, stream){
FILE: mode/coffeescript/coffeescript.js
function wordRegexp (line 21) | function wordRegexp(words) {
function tokenBase (line 50) | function tokenBase(stream, state) {
function tokenFactory (line 179) | function tokenFactory(delimiter, singleline, outclass) {
function longComment (line 206) | function longComment(stream, state) {
function indent (line 218) | function indent(stream, state, type) {
function dedent (line 242) | function dedent(stream, state) {
function tokenLexer (line 266) | function tokenLexer(stream, state) {
FILE: mode/commonlisp/commonlisp.js
function readSym (line 21) | function readSym(stream) {
function base (line 30) | function base(stream, state) {
function inString (line 64) | function inString(stream, state) {
function inComment (line 73) | function inComment(stream, state) {
FILE: mode/crystal/crystal.js
function wordRegExp (line 15) | function wordRegExp(words, end) {
function chain (line 19) | function chain(tokenize, stream, state) {
function tokenBase (line 58) | function tokenBase(stream, state) {
function tokenNest (line 237) | function tokenNest(begin, end, style, started) {
function tokenMacro (line 256) | function tokenMacro(begin, end, started) {
function tokenMacroDef (line 274) | function tokenMacroDef(stream, state) {
function tokenFollowIdent (line 291) | function tokenFollowIdent(stream, state) {
function tokenFollowType (line 305) | function tokenFollowType(stream, state) {
function tokenQuote (line 315) | function tokenQuote(end, style, embed) {
function tokenHereDoc (line 354) | function tokenHereDoc(phrase, embed) {
FILE: mode/css/css.js
function ret (line 36) | function ret(style, tp) { type = tp; return style; }
function tokenBase (line 40) | function tokenBase(stream, state) {
function tokenString (line 94) | function tokenString(quote) {
function tokenParenthesized (line 109) | function tokenParenthesized(stream, state) {
function Context (line 120) | function Context(type, indent, prev) {
function pushContext (line 126) | function pushContext(state, stream, type, indent) {
function popContext (line 131) | function popContext(state) {
function pass (line 137) | function pass(type, stream, state) {
function popAndPass (line 140) | function popAndPass(type, stream, state, n) {
function wordAsValue (line 148) | function wordAsValue(stream) {
function keySet (line 419) | function keySet(array) {
function tokenCComment (line 725) | function tokenCComment(stream, state) {
FILE: mode/css/gss_test.js
function MT (line 8) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/css/less_test.js
function MT (line 8) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/css/scss_test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/css/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/cypher/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/d/d.js
function tokenBase (line 27) | function tokenBase(stream, state) {
function tokenString (line 77) | function tokenString(quote) {
function tokenComment (line 90) | function tokenComment(stream, state) {
function tokenNestedComment (line 102) | function tokenNestedComment(stream, state) {
function Context (line 114) | function Context(indented, column, type, align, prev) {
function pushContext (line 121) | function pushContext(state, col, type) {
function popContext (line 127) | function popContext(state) {
function words (line 194) | function words(str) {
FILE: mode/d/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/dart/dart.js
function set (line 23) | function set(words) {
function pushInterpolationStack (line 29) | function pushInterpolationStack(state) {
function popInterpolationStack (line 33) | function popInterpolationStack(state) {
function sizeInterpolationStack (line 37) | function sizeInterpolationStack(state) {
function tokenString (line 96) | function tokenString(quote, stream, state, raw) {
function tokenInterpolation (line 123) | function tokenInterpolation(stream, state) {
function tokenInterpolationIdentifier (line 135) | function tokenInterpolationIdentifier(stream, state) {
function tokenNestedComment (line 141) | function tokenNestedComment(depth) {
FILE: mode/django/django.js
function tokenBase (line 49) | function tokenBase (stream, state) {
function inString (line 71) | function inString (delimiter, previousTokenizer) {
function inVariable (line 94) | function inVariable (stream, state) {
function inTag (line 193) | function inTag (stream, state) {
function inComment (line 319) | function inComment (stream, state) {
function inBlockComment (line 326) | function inBlockComment (stream, state) {
FILE: mode/dockerfile/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/dtd/dtd.js
function ret (line 23) | function ret(style, tp) {type = tp; return style;}
function tokenBase (line 25) | function tokenBase(stream, state) {
function tokenSGMLComment (line 54) | function tokenSGMLComment(stream, state) {
function tokenString (line 66) | function tokenString(quote) {
function inBlock (line 80) | function inBlock(style, terminator) {
FILE: mode/dylan/dylan.js
function forEach (line 14) | function forEach(arr, f) {
function some (line 17) | function some(arr, f) {
function chain (line 160) | function chain(stream, state, f) {
function tokenBase (line 165) | function tokenBase(stream, state) {
function tokenComment (line 295) | function tokenComment(stream, state) {
function tokenString (line 314) | function tokenString(quote, style) {
FILE: mode/dylan/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/ecl/ecl.js
function words (line 16) | function words(str) {
function metaHook (line 22) | function metaHook(stream, state) {
function tokenBase (line 41) | function tokenBase(stream, state) {
function tokenString (line 107) | function tokenString(quote) {
function tokenComment (line 120) | function tokenComment(stream, state) {
function Context (line 132) | function Context(indented, column, type, align, prev) {
function pushContext (line 139) | function pushContext(state, col, type) {
function popContext (line 142) | function popContext(state) {
FILE: mode/eiffel/eiffel.js
function wordObj (line 15) | function wordObj(words) {
function chain (line 88) | function chain(newtok, stream, state) {
function tokenBase (line 93) | function tokenBase(stream, state) {
function readQuoted (line 119) | function readQuoted(quote, style, unescaped) {
FILE: mode/elm/elm.js
function switchState (line 16) | function switchState(source, setState, f)
function normal (line 32) | function normal()
function chompMultiComment (line 125) | function chompMultiComment(nest)
function chompMultiString (line 155) | function chompMultiString(source, setState)
function chompSingleString (line 169) | function chompSingleString(source, setState)
function chompChar (line 183) | function chompChar(source, setState)
function chompGlsl (line 197) | function chompGlsl(source, setState)
FILE: mode/erlang/erlang.js
function tokenizer (line 103) | function tokenizer(stream,state) {
function nongreedy (line 290) | function nongreedy(stream,re,words) {
function greedy (line 304) | function greedy(stream,re,words) {
function doubleQuote (line 321) | function doubleQuote(stream) {
function singleQuote (line 325) | function singleQuote(stream) {
function quote (line 329) | function quote(stream,quoteChar,escapeChar) {
function lookahead (line 341) | function lookahead(stream) {
function is_member (line 346) | function is_member(element,list) {
function rval (line 350) | function rval(state,stream,type) {
function aToken (line 384) | function aToken(tok,col,ind,typ) {
function realToken (line 391) | function realToken(type,stream) {
function fakeToken (line 398) | function fakeToken(type) {
function peekToken (line 402) | function peekToken(state,depth) {
function pushToken (line 413) | function pushToken(state,token) {
function maybe_drop_pre (line 421) | function maybe_drop_pre(s,token) {
function maybe_drop_post (line 435) | function maybe_drop_post(s) {
function d (line 463) | function d(stack,tt) {
function indenter (line 503) | function indenter(state,textAfter) {
function wordafter (line 546) | function wordafter(str) {
function postcommaToken (line 552) | function postcommaToken(state) {
function defaultToken (line 559) | function defaultToken(state) {
function getToken (line 573) | function getToken(state,tokens) {
function getTokenIndex (line 580) | function getTokenIndex(objs,propname,propvals) {
function truthy (line 590) | function truthy(x) {
FILE: mode/fcl/fcl.js
function tokenBase (line 48) | function tokenBase(stream, state) {
function tokenComment (line 89) | function tokenComment(stream, state) {
function Context (line 101) | function Context(indented, column, type, align, prev) {
function pushContext (line 109) | function pushContext(state, col, type) {
function popContext (line 113) | function popContext(state) {
FILE: mode/forth/forth.js
function toWordList (line 16) | function toWordList(words) {
function searchWordList (line 67) | function searchWordList (wordList, word) {
FILE: mode/fortran/fortran.js
function words (line 15) | function words(array) {
function tokenBase (line 117) | function tokenBase(stream, state) {
function tokenString (line 155) | function tokenString(quote) {
FILE: mode/gas/gas.js
function x86 (line 144) | function x86(_parserConfig) {
function armv6 (line 199) | function armv6(_parserConfig) {
function nextUntilUnescaped (line 242) | function nextUntilUnescaped(stream, end) {
function clikeComment (line 253) | function clikeComment(stream, state) {
FILE: mode/gfm/gfm.js
function blankLine (line 18) | function blankLine(state) {
FILE: mode/gfm/test.js
function MT (line 7) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
function FT (line 9) | function FT(name) { test.mode(name, modeHighlightFormatting, Array.proto...
FILE: mode/go/go.js
function tokenBase (line 41) | function tokenBase(stream, state) {
function tokenString (line 85) | function tokenString(quote) {
function tokenComment (line 98) | function tokenComment(stream, state) {
function Context (line 110) | function Context(indented, column, type, align, prev) {
function pushContext (line 117) | function pushContext(state, col, type) {
function popContext (line 120) | function popContext(state) {
FILE: mode/groovy/groovy.js
function words (line 15) | function words(str) {
function tokenBase (line 31) | function tokenBase(stream, state) {
function startString (line 81) | function startString(quote, stream, state) {
function tokenBaseUntilBrace (line 112) | function tokenBaseUntilBrace() {
function tokenVariableDeref (line 130) | function tokenVariableDeref(stream, state) {
function tokenComment (line 137) | function tokenComment(stream, state) {
function expectExpression (line 149) | function expectExpression(last, newline) {
function Context (line 155) | function Context(indented, column, type, align, prev) {
function pushContext (line 162) | function pushContext(state, col, type) {
function popContext (line 165) | function popContext(state) {
FILE: mode/haml/haml.js
function rubyInQuote (line 19) | function rubyInQuote(endQuote) {
function ruby (line 33) | function ruby(stream, state) {
function html (line 41) | function html(stream, state) {
FILE: mode/haml/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/haskell/haskell.js
function switchState (line 16) | function switchState(source, setState, f) {
function normal (line 32) | function normal(source, setState) {
function ncomment (line 125) | function ncomment(type, nest) {
function stringLiteral (line 149) | function stringLiteral(source, setState) {
function stringGap (line 172) | function stringGap(source, setState) {
function setType (line 184) | function setType(t) {
FILE: mode/haxe/haxe.js
function kw (line 19) | function kw(type) {return {type: type, style: "keyword"};}
function chain (line 37) | function chain(stream, state, f) {
function toUnescaped (line 42) | function toUnescaped(stream, end) {
function ret (line 54) | function ret(tp, style, cont) {
function haxeTokenBase (line 59) | function haxeTokenBase(stream, state) {
function haxeTokenString (line 110) | function haxeTokenString(quote) {
function haxeTokenComment (line 118) | function haxeTokenComment(stream, state) {
function HaxeLexical (line 134) | function HaxeLexical(indented, column, type, align, prev, info) {
function inScope (line 143) | function inScope(state, varname) {
function parseHaxe (line 148) | function parseHaxe(state, style, type, content, stream) {
function imported (line 170) | function imported(state, typename) {
function registerimport (line 178) | function registerimport(importname) {
function pass (line 187) | function pass() {
function cont (line 190) | function cont() {
function inList (line 194) | function inList(name, list) {
function register (line 199) | function register(varname) {
function pushcontext (line 214) | function pushcontext() {
function popcontext (line 218) | function popcontext() {
function pushlex (line 223) | function pushlex(type, info) {
function poplex (line 231) | function poplex() {
function expect (line 241) | function expect(wanted) {
function statement (line 250) | function statement(type) {
function expression (line 272) | function expression(type) {
function maybeexpression (line 283) | function maybeexpression(type) {
function maybeoperator (line 288) | function maybeoperator(type, value) {
function maybeattribute (line 297) | function maybeattribute(type) {
function metadef (line 303) | function metadef(type) {
function metaargs (line 308) | function metaargs(type) {
function importdef (line 312) | function importdef (type, value) {
function typedef (line 317) | function typedef (type, value)
function maybelabel (line 323) | function maybelabel(type) {
function property (line 327) | function property(type) {
function objprop (line 330) | function objprop(type) {
function commasep (line 334) | function commasep(what, end) {
function block (line 345) | function block(type) {
function vardef1 (line 349) | function vardef1(type, value) {
function vardef2 (line 353) | function vardef2(type, value) {
function forspec1 (line 357) | function forspec1(type, value) {
function forin (line 365) | function forin(_type, value) {
function functiondef (line 368) | function functiondef(type, value) {
function typeuse (line 374) | function typeuse(type) {
function typestring (line 377) | function typestring(type) {
function typeprop (line 382) | function typeprop(type) {
function funarg (line 385) | function funarg(type, value) {
FILE: mode/htmlmixed/htmlmixed.js
function maybeBackup (line 29) | function maybeBackup(stream, pat, style) {
function getAttrRegexp (line 41) | function getAttrRegexp(attr) {
function getAttrValue (line 47) | function getAttrValue(text, attr) {
function getTagRegexp (line 52) | function getTagRegexp(tagName, anchored) {
function addTags (line 56) | function addTags(from, to) {
function findMatchingMode (line 65) | function findMatchingMode(tagInfo, tagText) {
function html (line 88) | function html(stream, state) {
FILE: mode/http/http.js
function failFirstLine (line 15) | function failFirstLine(stream, state) {
function start (line 21) | function start(stream, state) {
function responseStatusCode (line 33) | function responseStatusCode(stream, state) {
function responseStatusText (line 54) | function responseStatusText(stream, state) {
function requestPath (line 60) | function requestPath(stream, state) {
function requestProtocol (line 66) | function requestProtocol(stream, state) {
function header (line 75) | function header(stream) {
function body (line 89) | function body(stream) {
FILE: mode/idl/idl.js
function wordRegexp (line 14) | function wordRegexp(words) {
function tokenBase (line 244) | function tokenBase(stream) {
FILE: mode/javascript/javascript.js
function kw (line 26) | function kw(type) {return {type: type, style: "keyword"};}
function readRegexp (line 47) | function readRegexp(stream) {
function ret (line 62) | function ret(tp, style, cont) {
function tokenBase (line 66) | function tokenBase(stream, state) {
function tokenString (line 137) | function tokenString(quote) {
function tokenComment (line 153) | function tokenComment(stream, state) {
function tokenQuasi (line 165) | function tokenQuasi(stream, state) {
function findFatArrow (line 185) | function findFatArrow(stream, state) {
function JSLexical (line 225) | function JSLexical(indented, column, type, align, prev, info) {
function inScope (line 234) | function inScope(state, varname) {
function parseJS (line 244) | function parseJS(state, style, type, content, stream) {
function pass (line 268) | function pass() {
function cont (line 271) | function cont() {
function inList (line 275) | function inList(name, list) {
function register (line 279) | function register(varname) {
function registerVarScoped (line 300) | function registerVarScoped(varname, context) {
function isModifier (line 315) | function isModifier(name) {
function Context (line 321) | function Context(prev, vars, block) { this.prev = prev; this.vars = vars...
function Var (line 322) | function Var(name, next) { this.name = name; this.next = next }
function pushcontext (line 325) | function pushcontext() {
function pushblockcontext (line 329) | function pushblockcontext() {
function popcontext (line 334) | function popcontext() {
function pushlex (line 339) | function pushlex(type, info) {
function poplex (line 350) | function poplex() {
function expect (line 360) | function expect(wanted) {
function statement (line 369) | function statement(type, value) {
function maybeCatchBinding (line 418) | function maybeCatchBinding(type) {
function expression (line 421) | function expression(type, value) {
function expressionNoComma (line 424) | function expressionNoComma(type, value) {
function parenExpr (line 427) | function parenExpr(type) {
function expressionInner (line 431) | function expressionInner(type, value, noComma) {
function maybeexpression (line 451) | function maybeexpression(type) {
function maybeoperatorComma (line 456) | function maybeoperatorComma(type, value) {
function maybeoperatorNoComma (line 460) | function maybeoperatorNoComma(type, value, noComma) {
function quasi (line 483) | function quasi(type, value) {
function continueQuasi (line 488) | function continueQuasi(type) {
function arrowBody (line 495) | function arrowBody(type) {
function arrowBodyNoComma (line 499) | function arrowBodyNoComma(type) {
function maybeTarget (line 503) | function maybeTarget(noComma) {
function target (line 510) | function target(_, value) {
function targetNoComma (line 513) | function targetNoComma(_, value) {
function maybelabel (line 516) | function maybelabel(type) {
function property (line 520) | function property(type) {
function objprop (line 523) | function objprop(type, value) {
function getterSetter (line 553) | function getterSetter(type) {
function afterprop (line 558) | function afterprop(type) {
function commasep (line 562) | function commasep(what, end, sep) {
function contCommasep (line 581) | function contCommasep(what, end, info) {
function block (line 586) | function block(type) {
function maybetype (line 590) | function maybetype(type, value) {
function maybetypeOrIn (line 596) | function maybetypeOrIn(type, value) {
function mayberettype (line 599) | function mayberettype(type) {
function isKW (line 605) | function isKW(_, value) {
function typeexpr (line 611) | function typeexpr(type, value) {
function maybeReturnType (line 628) | function maybeReturnType(type) {
function typeprops (line 631) | function typeprops(type) {
function typeprop (line 636) | function typeprop(type, value) {
function quasiType (line 652) | function quasiType(type, value) {
function continueQuasiType (line 657) | function continueQuasiType(type) {
function typearg (line 664) | function typearg(type, value) {
function afterType (line 670) | function afterType(type, value) {
function maybeTypeArgs (line 677) | function maybeTypeArgs(_, value) {
function typeparam (line 680) | function typeparam() {
function maybeTypeDefault (line 683) | function maybeTypeDefault(_, value) {
function vardef (line 686) | function vardef(_, value) {
function pattern (line 690) | function pattern(type, value) {
function proppattern (line 697) | function proppattern(type, value) {
function eltpattern (line 708) | function eltpattern() {
function maybeAssign (line 711) | function maybeAssign(_type, value) {
function vardefCont (line 714) | function vardefCont(type) {
function maybeelse (line 717) | function maybeelse(type, value) {
function forspec (line 720) | function forspec(type, value) {
function forspec1 (line 724) | function forspec1(type) {
function forspec2 (line 729) | function forspec2(type, value) {
function functiondef (line 735) | function functiondef(type, value) {
function functiondecl (line 741) | function functiondecl(type, value) {
function typename (line 747) | function typename(type, value) {
function funarg (line 755) | function funarg(type, value) {
function classExpression (line 762) | function classExpression(type, value) {
function className (line 767) | function className(type, value) {
function classNameAfter (line 770) | function classNameAfter(type, value) {
function classBody (line 778) | function classBody(type, value) {
function classfield (line 802) | function classfield(type, value) {
function afterExport (line 810) | function afterExport(type, value) {
function exportField (line 816) | function exportField(type, value) {
function afterImport (line 820) | function afterImport(type) {
function importSpec (line 826) | function importSpec(type, value) {
function maybeMoreImports (line 832) | function maybeMoreImports(type) {
function maybeAs (line 835) | function maybeAs(_type, value) {
function maybeFrom (line 838) | function maybeFrom(_type, value) {
function arrayLiteral (line 841) | function arrayLiteral(type) {
function enumdef (line 845) | function enumdef() {
function enummember (line 848) | function enummember() {
function isContinuedStatement (line 852) | function isContinuedStatement(state, textAfter) {
function expressionAllowed (line 858) | function expressionAllowed(stream, state, backUp) {
FILE: mode/javascript/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
function TS (line 329) | function TS(name) {
function LD (line 488) | function LD(name) {
FILE: mode/jinja2/jinja2.js
function tokenBase (line 36) | function tokenBase (stream, state) {
FILE: mode/jsx/jsx.js
function Context (line 17) | function Context(state, mode, depth, prev) {
function copyContext (line 21) | function copyContext(context) {
function flatXMLIndent (line 32) | function flatXMLIndent(state) {
function token (line 40) | function token(stream, state) {
function xmlToken (line 47) | function xmlToken(stream, state, cx) {
function jsToken (line 105) | function jsToken(stream, state, cx) {
FILE: mode/jsx/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
function TS (line 84) | function TS(name) { test.mode(name, ts_mode, Array.prototype.slice.call(...
FILE: mode/julia/julia.js
function wordRegexp (line 15) | function wordRegexp(words, end, pre) {
function inArray (line 73) | function inArray(state) {
function inGenerator (line 77) | function inGenerator(state) {
function currentScope (line 81) | function currentScope(state, n) {
function tokenBase (line 90) | function tokenBase(stream, state) {
function tokenAnnotation (line 261) | function tokenAnnotation(stream, state) {
function tokenComment (line 276) | function tokenComment(stream, state) {
function tokenChar (line 291) | function tokenChar(stream, state) {
function tokenStringFactory (line 318) | function tokenStringFactory(delimiter) {
FILE: mode/lua/lua.js
function prefixRE (line 21) | function prefixRE(words) {
function wordRE (line 24) | function wordRE(words) {
function readBracket (line 70) | function readBracket(stream) {
function normal (line 77) | function normal(stream, state) {
function bracketed (line 100) | function bracketed(level, style) {
function string (line 113) | function string(quote) {
FILE: mode/markdown/markdown.js
function getMode (line 19) | function getMode(name) {
function switchInline (line 100) | function switchInline(stream, state, f) {
function switchBlock (line 105) | function switchBlock(stream, state, f) {
function lineIsEmpty (line 110) | function lineIsEmpty(line) {
function blankLine (line 116) | function blankLine(state) {
function blockNormal (line 153) | function blockNormal(stream, state) {
function htmlBlock (line 284) | function htmlBlock(stream, state) {
function local (line 299) | function local(stream, state) {
function getType (line 324) | function getType(state) {
function handleText (line 407) | function handleText(stream, state) {
function inlineNormal (line 414) | function inlineNormal(stream, state) {
function linkInline (line 644) | function linkInline(stream, state) {
function linkHref (line 664) | function linkHref(stream, state) {
function getLinkHrefInside (line 684) | function getLinkHrefInside(endChar) {
function footnoteLink (line 702) | function footnoteLink(stream, state) {
function footnoteLinkInside (line 713) | function footnoteLinkInside(stream, state) {
function footnoteUrl (line 727) | function footnoteUrl(stream, state) {
FILE: mode/markdown/test.js
function MT (line 7) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
function FT (line 9) | function FT(name) { test.mode(name, modeHighlightFormatting, Array.proto...
function MT_noXml (line 11) | function MT_noXml(name) { test.mode(name, modeMT_noXml, Array.prototype....
function MT_noFencedHighlight (line 13) | function MT_noFencedHighlight(name) { test.mode(name, modeMT_noFencedHig...
function AtxNoSpaceTest (line 15) | function AtxNoSpaceTest(name) { test.mode(name, modeAtxNoSpace, Array.pr...
function TokenTypeOverrideTest (line 40) | function TokenTypeOverrideTest(name) { test.mode(name, modeOverrideClass...
function FormatTokenTypeOverrideTest (line 47) | function FormatTokenTypeOverrideTest(name) { test.mode(name, modeFormatt...
function ET (line 49) | function ET(name) { test.mode(name, modeET, Array.prototype.slice.call(a...
FILE: mode/mathematica/mathematica.js
function tokenBase (line 32) | function tokenBase(stream, state) {
function tokenString (line 133) | function tokenString(stream, state) {
function tokenComment (line 148) | function tokenComment(stream, state) {
FILE: mode/mbox/mbox.js
function styleForHeader (line 35) | function styleForHeader(header) {
function readToken (line 40) | function readToken(stream, state) {
FILE: mode/mirc/mirc.js
function parseWords (line 18) | function parseWords(str) {
function chain (line 86) | function chain(stream, state, f) {
function tokenBase (line 90) | function tokenBase(stream, state) {
function tokenComment (line 153) | function tokenComment(stream, state) {
function tokenUnparsed (line 164) | function tokenUnparsed(stream, state) {
FILE: mode/mllike/mllike.js
function tokenBase (line 48) | function tokenBase(stream, state) {
function tokenString (line 110) | function tokenString(stream, state) {
function tokenComment (line 125) | function tokenComment(stream, state) {
function tokenLongString (line 138) | function tokenLongString(stream, state) {
FILE: mode/modelica/modelica.js
function tokenLineComment (line 30) | function tokenLineComment(stream, state) {
function tokenBlockComment (line 36) | function tokenBlockComment(stream, state) {
function tokenString (line 48) | function tokenString(stream, state) {
function tokenIdent (line 62) | function tokenIdent(stream, state) {
function tokenQIdent (line 81) | function tokenQIdent(stream, state) {
function tokenUnsignedNumber (line 93) | function tokenUnsignedNumber(stream, state) {
function words (line 202) | function words(str) {
function def (line 213) | function def(mimes, mode) {
FILE: mode/mscgen/mscgen.js
function wordRegexpBoundary (line 74) | function wordRegexpBoundary(pWords) {
function wordRegexp (line 78) | function wordRegexp(pWords) {
function startStateFn (line 82) | function startStateFn() {
function copyStateFn (line 91) | function copyStateFn(pState) {
function produceTokenFunction (line 100) | function produceTokenFunction(pConfig) {
FILE: mode/mscgen/mscgen_test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/mscgen/msgenny_test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/mscgen/xu_test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/mumps/mumps.js
function wordRegexp (line 19) | function wordRegexp(words) {
function tokenBase (line 34) | function tokenBase(stream, state) {
FILE: mode/nginx/nginx.js
function words (line 16) | function words(str) {
function ret (line 36) | function ret(style, tp) {type = tp; return style;}
function tokenBase (line 38) | function tokenBase(stream, state) {
function tokenCComment (line 97) | function tokenCComment(stream, state) {
function tokenSGMLComment (line 109) | function tokenSGMLComment(stream, state) {
function tokenString (line 121) | function tokenString(quote) {
FILE: mode/ntriples/ntriples.js
function transitState (line 59) | function transitState(currState, c) {
FILE: mode/octave/octave.js
function wordRegexp (line 15) | function wordRegexp(words) {
function tokenTranspose (line 46) | function tokenTranspose(stream, state) {
function tokenComment (line 57) | function tokenComment(stream, state) {
function tokenBase (line 66) | function tokenBase(stream, state) {
FILE: mode/oz/oz.js
function wordRegexp (line 16) | function wordRegexp(words) {
function tokenBase (line 37) | function tokenBase(stream, state) {
function tokenClass (line 139) | function tokenClass(stream, state) {
function tokenMeth (line 148) | function tokenMeth(stream, state) {
function tokenFunProc (line 157) | function tokenFunProc(stream, state) {
function tokenComment (line 178) | function tokenComment(stream, state) {
function tokenString (line 190) | function tokenString(quote) {
function buildElectricInputRegEx (line 206) | function buildElectricInputRegEx() {
FILE: mode/pascal/pascal.js
function words (line 15) | function words(str) {
function tokenBase (line 39) | function tokenBase(stream, state) {
function tokenString (line 81) | function tokenString(quote) {
function tokenComment (line 93) | function tokenComment(stream, state) {
function tokenCommentBraces (line 105) | function tokenCommentBraces(stream, state) {
FILE: mode/pegjs/pegjs.js
function identifier (line 17) | function identifier(stream) {
FILE: mode/perl/perl.js
function tokenChain (line 483) | function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.l...
function tokenSOMETHING (line 503) | function tokenSOMETHING(stream,state,string){
function tokenPerl (line 511) | function tokenPerl(stream,state){
function look (line 803) | function look(stream, c){
function prefix (line 808) | function prefix(stream, c){
function suffix (line 818) | function suffix(stream, c){
function eatSuffix (line 825) | function eatSuffix(stream, c){
FILE: mode/php/php.js
function keywords (line 14) | function keywords(str) {
function matchSequence (line 21) | function matchSequence(list, end, escapes) {
function phpString (line 33) | function phpString(closing, escapes) {
function phpString_ (line 36) | function phpString_(stream, state, closing, escapes) {
function dispatch (line 157) | function dispatch(stream, state) {
FILE: mode/php/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
function build_recursive_monsters (line 78) | function build_recursive_monsters(nt, t, n){
function build_recursive_monsters_2 (line 124) | function build_recursive_monsters_2(mf1, mf2, nt, t, n){
FILE: mode/pig/pig.js
function chain (line 28) | function chain(stream, state, f) {
function tokenComment (line 33) | function tokenComment(stream, state) {
function tokenString (line 46) | function tokenString(quote) {
function tokenBase (line 62) | function tokenBase(stream, state) {
function keywords (line 140) | function keywords(str) {
FILE: mode/powershell/powershell.js
function buildRegexp (line 16) | function buildRegexp(patterns, options) {
function tokenBase (line 162) | function tokenBase(stream, state) {
function tokenSingleQuoteString (line 237) | function tokenSingleQuoteString(stream, state) {
function tokenDoubleQuoteString (line 251) | function tokenDoubleQuoteString(stream, state) {
function tokenStringInterpolation (line 274) | function tokenStringInterpolation(stream, state) {
function tokenMultiStringReturn (line 278) | function tokenMultiStringReturn(stream, state) {
function tokenHereStringInterpolation (line 284) | function tokenHereStringInterpolation(stream, state) {
function tokenInterpolation (line 288) | function tokenInterpolation(stream, state, parentTokenize) {
function tokenComment (line 312) | function tokenComment(stream, state) {
function tokenVariable (line 324) | function tokenVariable(stream, state) {
function tokenVariableWithBraces (line 339) | function tokenVariableWithBraces(stream, state) {
function tokenMultiString (line 350) | function tokenMultiString(stream, state) {
FILE: mode/powershell/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
function forEach (line 8) | function forEach(arr, f) { for (var i = 0; i < arr.length; i++) f(arr[i]...
FILE: mode/protobuf/protobuf.js
function wordRegexp (line 14) | function wordRegexp(words) {
function tokenBase (line 31) | function tokenBase(stream) {
FILE: mode/pug/pug.js
function State (line 29) | function State() {
function javaScript (line 105) | function javaScript(stream, state) {
function javaScriptArguments (line 122) | function javaScriptArguments(stream, state) {
function yieldStatement (line 143) | function yieldStatement(stream) {
function doctype (line 149) | function doctype(stream) {
function interpolation (line 155) | function interpolation(stream, state) {
function interpolationContinued (line 163) | function interpolationContinued(stream, state) {
function caseStatement (line 179) | function caseStatement(stream, state) {
function when (line 186) | function when(stream, state) {
function defaultStatement (line 194) | function defaultStatement(stream) {
function extendsStatement (line 200) | function extendsStatement(stream, state) {
function append (line 207) | function append(stream, state) {
function prepend (line 213) | function prepend(stream, state) {
function block (line 219) | function block(stream, state) {
function include (line 226) | function include(stream, state) {
function includeFiltered (line 233) | function includeFiltered(stream, state) {
function includeFilteredContinued (line 240) | function includeFilteredContinued(stream, state) {
function mixin (line 249) | function mixin(stream, state) {
function call (line 256) | function call(stream, state) {
function callArguments (line 270) | function callArguments(stream, state) {
function conditional (line 281) | function conditional(stream, state) {
function each (line 288) | function each(stream, state) {
function eachContinued (line 294) | function eachContinued(stream, state) {
function whileStatement (line 309) | function whileStatement(stream, state) {
function tag (line 316) | function tag(stream, state) {
function filter (line 327) | function filter(stream, state) {
function code (line 344) | function code(stream, state) {
function id (line 351) | function id(stream) {
function className (line 357) | function className(stream) {
function attrs (line 363) | function attrs(stream, state) {
function attrsContinued (line 375) | function attrsContinued(stream, state) {
function attributesBlock (line 419) | function attributesBlock(stream, state) {
function indent (line 427) | function indent(stream) {
function comment (line 433) | function comment(stream, state) {
function colon (line 441) | function colon(stream) {
function text (line 447) | function text(stream, state) {
function dot (line 459) | function dot(stream, state) {
function fail (line 472) | function fail(stream) {
function setInnerMode (line 478) | function setInnerMode(stream, state, mode) {
function innerMode (line 491) | function innerMode(stream, state, force) {
function restOfLine (line 511) | function restOfLine(stream, state) {
function startState (line 525) | function startState() {
function copyState (line 528) | function copyState(state) {
function nextToken (line 537) | function nextToken(stream, state) {
FILE: mode/puppet/puppet.js
function define (line 22) | function define(style, string) {
function tokenString (line 47) | function tokenString(stream, state) {
function tokenize (line 68) | function tokenize(stream, state) {
FILE: mode/python/python.js
function wordRegexp (line 14) | function wordRegexp(words) {
function top (line 37) | function top(state) {
function tokenBase (line 78) | function tokenBase(stream, state) {
function tokenBaseInner (line 101) | function tokenBaseInner(stream, state, inFormat) {
function formatStringFactory (line 183) | function formatStringFactory(delimiter, tokenOuter) {
function tokenStringFactory (line 244) | function tokenStringFactory(delimiter, tokenOuter) {
function pushPyScope (line 277) | function pushPyScope(state) {
function pushBracketScope (line 284) | function pushBracketScope(stream, state, type) {
function dedent (line 291) | function dedent(stream, state) {
function tokenLexer (line 300) | function tokenLexer(stream, state) {
FILE: mode/python/test.js
function MT (line 9) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/q/q.js
function buildRE (line 19) | function buildRE(w){return new RegExp("^("+w.join("|")+")$");}
function tokenBase (line 20) | function tokenBase(stream,state){
function tokenLineComment (line 62) | function tokenLineComment(stream,state){
function tokenBlockComment (line 65) | function tokenBlockComment(stream,state){
function tokenCommentToEOF (line 72) | function tokenCommentToEOF(stream){return stream.skipToEnd(),"comment";}
function tokenString (line 73) | function tokenString(stream,state){
function pushContext (line 82) | function pushContext(state,type,col){state.context={prev:state.context,i...
function popContext (line 83) | function popContext(state){state.indent=state.context.indent;state.conte...
FILE: mode/r/r.js
function wordObj (line 17) | function wordObj(words) {
function tokenBase (line 36) | function tokenBase(stream, state) {
function tokenString (line 97) | function tokenString(quote) {
function push (line 120) | function push(state, type, stream) {
function setFlag (line 127) | function setFlag(state, flag) {
function pop (line 135) | function pop(state) {
FILE: mode/rst/rst.js
function format (line 76) | function format(string) {
function to_normal (line 156) | function to_normal(stream, state) {
function to_explicit (line 356) | function to_explicit(stream, state) {
function to_comment (line 463) | function to_comment(stream, state) {
function to_verbatim (line 467) | function to_verbatim(stream, state) {
function as_block (line 471) | function as_block(stream, state, token) {
function to_mode (line 484) | function to_mode(stream, state) {
function context (line 503) | function context(phase, stage, mode, local) {
function change (line 507) | function change(state, tok, ctx) {
function stage (line 512) | function stage(state) {
function phase (line 516) | function phase(state) {
FILE: mode/ruby/ruby.js
function wordObj (line 14) | function wordObj(words) {
function chain (line 38) | function chain(newtok, stream, state) {
function tokenBase (line 43) | function tokenBase(stream, state) {
function regexpAhead (line 143) | function regexpAhead(stream) {
function tokenBaseUntilBrace (line 165) | function tokenBaseUntilBrace(depth) {
function tokenBaseOnce (line 181) | function tokenBaseOnce() {
function readQuoted (line 192) | function readQuoted(quote, style, embed, unescaped) {
function readHereDoc (line 223) | function readHereDoc(phrase, mayIndent) {
function readBlockComment (line 231) | function readBlockComment(stream, state) {
FILE: mode/ruby/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/rust/test.js
function MT (line 6) | function MT(name) {test.mode(name, mode, Array.prototype.slice.call(argu...
FILE: mode/sas/sas.js
function define (line 51) | function define(style, string, context) {
function tokenize (line 95) | function tokenize(stream, state) {
FILE: mode/sass/sass.js
function tokenRegexp (line 21) | function tokenRegexp(words) {
function isEndLine (line 36) | function isEndLine(stream) {
function urlTokens (line 40) | function urlTokens(stream, state) {
function comment (line 60) | function comment(indentation, multiLine) {
function buildStringTokenizer (line 79) | function buildStringTokenizer(quote, greedy) {
function buildInterpolationTokenizer (line 108) | function buildInterpolationTokenizer(currentTokenizer) {
function indent (line 120) | function indent(state) {
function dedent (line 129) | function dedent(state) {
function tokenBase (line 135) | function tokenBase(stream, state) {
function tokenLexer (line 396) | function tokenLexer(stream, state) {
FILE: mode/sass/test.js
function MT (line 9) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/scheme/scheme.js
function makeKeywords (line 24) | function makeKeywords(str) {
function stateStack (line 33) | function stateStack(indent, type, prev) { // represents a state stack ob...
function pushStack (line 39) | function pushStack(state, indent, type) {
function popStack (line 43) | function popStack(state) {
function isBinaryNumber (line 52) | function isBinaryNumber (stream) {
function isOctalNumber (line 56) | function isOctalNumber (stream) {
function isDecimalNumber (line 60) | function isDecimalNumber (stream, backup) {
function isHexNumber (line 67) | function isHexNumber (stream) {
function processEscapedSequence (line 71) | function processEscapedSequence(stream, options) {
FILE: mode/shell/shell.js
function define (line 17) | function define(style, dict) {
function tokenBase (line 39) | function tokenBase(stream, state) {
function tokenString (line 93) | function tokenString(quote, style) {
function tokenStringStart (line 120) | function tokenStringStart(quote, style) {
function tokenHeredoc (line 140) | function tokenHeredoc(delim) {
function tokenize (line 148) | function tokenize(stream, state) {
FILE: mode/shell/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/sieve/sieve.js
function words (line 15) | function words(str) {
function tokenBase (line 25) | function tokenBase(stream, state) {
function tokenMultiLineString (line 112) | function tokenMultiLineString(stream, state)
function tokenCComment (line 137) | function tokenCComment(stream, state) {
function tokenString (line 149) | function tokenString(quote) {
FILE: mode/slim/slim.js
function backup (line 72) | function backup(pos, tokenize, style) {
function maybeBackup (line 87) | function maybeBackup(stream, state, pat, offset, style) {
function continueLine (line 97) | function continueLine(state, column) {
function finishContinue (line 106) | function finishContinue(state) {
function lineContinuable (line 113) | function lineContinuable(column, tokenize) {
function commaContinuable (line 127) | function commaContinuable(column, tokenize) {
function rubyInQuote (line 138) | function rubyInQuote(endQuote, tokenize) {
function startRubySplat (line 152) | function startRubySplat(tokenize) {
function ruby (line 174) | function ruby(stream, state) {
function htmlLine (line 178) | function htmlLine(stream, state) {
function html (line 184) | function html(stream, state) {
function startHtmlLine (line 192) | function startHtmlLine(lastTokenize) {
function startHtmlMode (line 200) | function startHtmlMode(stream, state, offset) {
function comment (line 211) | function comment(stream, state) {
function commentMode (line 216) | function commentMode(stream, state) {
function attributeWrapper (line 227) | function attributeWrapper(stream, state) {
function attributeWrapperAssign (line 241) | function attributeWrapperAssign(stream, state) {
function attributeWrapperValue (line 248) | function attributeWrapperValue(stream, state) {
function startAttributeWrapperMode (line 265) | function startAttributeWrapperMode(state, endQuote, tokenize) {
function sub (line 278) | function sub(stream, state) {
function firstSub (line 292) | function firstSub(stream, state) {
function createMode (line 298) | function createMode(mode) {
function getMode (line 311) | function getMode(mode) {
function startSubMode (line 318) | function startSubMode(mode, state) {
function doctypeLine (line 335) | function doctypeLine(stream, _state) {
function startLine (line 340) | function startLine(stream, state) {
function slim (line 368) | function slim(stream, state) {
function slimTag (line 375) | function slimTag(stream, state) {
function slimTagExtras (line 386) | function slimTagExtras(stream, state) {
function slimClass (line 393) | function slimClass(stream, state) {
function slimAttribute (line 404) | function slimAttribute(stream, state) {
function slimAttributeAssign (line 419) | function slimAttributeAssign(stream, state) {
function slimAttributeValue (line 428) | function slimAttributeValue(stream, state) {
function slimAttributeSymbols (line 447) | function slimAttributeSymbols(stream, state) {
function readQuoted (line 456) | function readQuoted(quote, style, embed, unescaped, nextTokenize) {
function slimContent (line 490) | function slimContent(stream, state) {
FILE: mode/slim/test.js
function MT (line 8) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/smarty/smarty.js
function cont (line 32) | function cont(style, lastType) {
function chain (line 37) | function chain(stream, state, parser) {
function doesNotCount (line 43) | function doesNotCount(stream, pos) {
function tokenTop (line 49) | function tokenTop(stream, state) {
function tokenSmarty (line 75) | function tokenSmarty(stream, state) {
function tokenAttribute (line 158) | function tokenAttribute(quote) {
function tokenBlock (line 174) | function tokenBlock(style, terminator) {
FILE: mode/solr/solr.js
function isNumber (line 21) | function isNumber(word) {
function tokenString (line 25) | function tokenString(quote) {
function tokenOperator (line 38) | function tokenOperator(operator) {
function tokenWord (line 57) | function tokenWord(ch) {
function tokenBase (line 76) | function tokenBase(stream, state) {
FILE: mode/soy/soy.js
function last (line 73) | function last(array) {
function tokenUntil (line 77) | function tokenUntil(stream, state, untilRegExp) {
function contains (line 99) | function contains(list, element) {
function prepend (line 107) | function prepend(list, element) {
function popcontext (line 114) | function popcontext(state) {
function ref (line 124) | function ref(list, name, loose) {
function Context (line 129) | function Context(previousContext, tag, scope) {
function expression (line 136) | function expression(stream, state) {
FILE: mode/soy/test.js
function MT (line 6) | function MT(name) {test.mode(name, mode, Array.prototype.slice.call(argu...
FILE: mode/sparql/sparql.js
function wordRegexp (line 18) | function wordRegexp(words) {
function tokenBase (line 40) | function tokenBase(stream, state) {
function eatPnLocal (line 91) | function eatPnLocal(stream) {
function tokenLiteral (line 95) | function tokenLiteral(quote) {
function pushContext (line 109) | function pushContext(state, type, col) {
function popContext (line 112) | function popContext(state) {
FILE: mode/sql/sql.js
function tokenBase (line 27) | function tokenBase(stream, state) {
function tokenLiteral (line 131) | function tokenLiteral(quote, backslashEscapes) {
function tokenComment (line 144) | function tokenComment(depth) {
function pushContext (line 155) | function pushContext(stream, state, type) {
function popContext (line 164) | function popContext(state) {
function hookIdentifier (line 214) | function hookIdentifier(stream) {
function hookIdentifierDoublequote (line 226) | function hookIdentifierDoublequote(stream) {
function hookVar (line 239) | function hookVar(stream) {
function hookClient (line 266) | function hookClient(stream) {
function set (line 281) | function set(str) {
FILE: mode/stex/stex.js
function pushCommand (line 22) | function pushCommand(state, command) {
function peekCommand (line 26) | function peekCommand(state) {
function popCommand (line 34) | function popCommand(state) {
function getMostPowerful (line 42) | function getMostPowerful(state) {
function addPluginPattern (line 54) | function addPluginPattern(pluginName, cmdStyle, styles) {
function setState (line 96) | function setState(state, f) {
function normal (line 101) | function normal(source, state) {
function inMathMode (line 172) | function inMathMode(source, state, endModeSeq) {
function beginParams (line 217) | function beginParams(source, state) {
FILE: mode/stex/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/stylus/stylus.js
function tokenBase (line 47) | function tokenBase(stream, state) {
function tokenCComment (line 164) | function tokenCComment(stream, state) {
function tokenString (line 179) | function tokenString(quote) {
function tokenParenthesized (line 197) | function tokenParenthesized(stream, state) {
function Context (line 209) | function Context(type, indent, prev, line) {
function pushContext (line 216) | function pushContext(state, stream, type, indent) {
function popContext (line 222) | function popContext(state, currentIndent) {
function pass (line 230) | function pass(type, stream, state) {
function popAndPass (line 234) | function popAndPass(type, stream, state, n) {
function wordIsTag (line 244) | function wordIsTag(word) {
function wordIsProperty (line 248) | function wordIsProperty(word) {
function wordIsBlock (line 253) | function wordIsBlock(word) {
function wordIsVendorPrefix (line 257) | function wordIsVendorPrefix(word) {
function wordAsValue (line 261) | function wordAsValue(word) {
function typeIsBlock (line 275) | function typeIsBlock(type, stream) {
function typeIsInterpolation (line 279) | function typeIsInterpolation(type, stream) {
function typeIsPseudo (line 283) | function typeIsPseudo(type, stream) {
function startOfLine (line 287) | function startOfLine(stream) {
function endOfLine (line 291) | function endOfLine(stream) {
function firstWordOfLine (line 295) | function firstWordOfLine(line) {
function wordRegexp (line 758) | function wordRegexp(words) {
function keySet (line 763) | function keySet(array) {
function escapeRegExp (line 769) | function escapeRegExp(text) {
FILE: mode/swift/swift.js
function wordSet (line 16) | function wordSet(words) {
function tokenBase (line 45) | function tokenBase(stream, state, prev) {
function tokenUntilClosingParen (line 100) | function tokenUntilClosingParen() {
function tokenString (line 119) | function tokenString(openQuote, stream, state) {
function tokenComment (line 144) | function tokenComment(stream, state) {
function Context (line 157) | function Context(prev, align, indented) {
function pushContext (line 163) | function pushContext(state, stream) {
function popContext (line 168) | function popContext(state) {
FILE: mode/swift/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/tcl/tcl.js
function parseWords (line 17) | function parseWords(str) {
function chain (line 37) | function chain(stream, state, f) {
function tokenBase (line 41) | function tokenBase(stream, state) {
function tokenString (line 84) | function tokenString(quote) {
function tokenComment (line 98) | function tokenComment(stream, state) {
function tokenUnparsed (line 109) | function tokenUnparsed(stream, state) {
FILE: mode/textile/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/textile/textile.js
function startNewLine (line 49) | function startNewLine(stream, state) {
function handlePhraseModifier (line 58) | function handlePhraseModifier(stream, state, ch) {
function togglePhraseModifier (line 119) | function togglePhraseModifier(stream, state, phraseModifier, closeRE, op...
function tokenStyles (line 136) | function tokenStyles(state) {
function textileDisabled (line 153) | function textileDisabled(state) {
function tokenStylesWith (line 168) | function tokenStylesWith(state, extraStyles) {
function activeStyles (line 179) | function activeStyles(state) {
function blankLine (line 188) | function blankLine(state) {
function RE (line 288) | function RE(name) {
FILE: mode/tiddlywiki/tiddlywiki.js
function chain (line 61) | function chain(stream, state, f) {
function tokenBase (line 66) | function tokenBase(stream, state) {
function twTokenComment (line 179) | function twTokenComment(stream, state) {
function twTokenStrong (line 192) | function twTokenStrong(stream, state) {
function twTokenCode (line 206) | function twTokenCode(stream, state) {
function twTokenEm (line 228) | function twTokenEm(stream, state) {
function twTokenUnderline (line 242) | function twTokenUnderline(stream, state) {
function twTokenStrike (line 257) | function twTokenStrike(stream, state) {
function twTokenMacro (line 271) | function twTokenMacro(stream, state) {
FILE: mode/tiki/tiki.js
function inBlock (line 15) | function inBlock(style, terminator, returnTokenizer) {
function inLine (line 31) | function inLine(style) {
function inText (line 41) | function inText(stream, state) {
function inPlugin (line 133) | function inPlugin(stream, state) {
function inAttribute (line 167) | function inAttribute(quote) {
function inAttributeNoQuote (line 179) | function inAttributeNoQuote() {
function pass (line 194) | function pass() {
function cont (line 198) | function cont() {
function pushContext (line 203) | function pushContext(pluginName, startOfLine) {
function popContext (line 214) | function popContext() {
function element (line 218) | function element(type) {
function endplugin (line 239) | function endplugin(startOfLine) {
function endcloseplugin (line 251) | function endcloseplugin(err) {
function attributes (line 259) | function attributes(type) {
function attvalue (line 264) | function attvalue(type) {
function attvaluemaybe (line 269) | function attvaluemaybe(type) {
FILE: mode/tornado/tornado.js
function tokenBase (line 25) | function tokenBase (stream, state) {
function inTag (line 35) | function inTag (close) {
FILE: mode/troff/troff.js
function tokenBase (line 18) | function tokenBase(stream) {
function tokenize (line 68) | function tokenize(stream, state) {
FILE: mode/ttcn-cfg/ttcn-cfg.js
function tokenBase (line 24) | function tokenBase(stream, state) {
function tokenString (line 61) | function tokenString(quote) {
function Context (line 83) | function Context(indented, column, type, align, prev) {
function pushContext (line 90) | function pushContext(state, col, type) {
function popContext (line 96) | function popContext(state) {
function words (line 154) | function words(str) {
FILE: mode/ttcn/ttcn.js
function tokenBase (line 37) | function tokenBase(stream, state) {
function tokenString (line 105) | function tokenString(quote) {
function tokenComment (line 127) | function tokenComment(stream, state) {
function Context (line 139) | function Context(indented, column, type, align, prev) {
function pushContext (line 147) | function pushContext(state, col, type) {
function popContext (line 154) | function popContext(state) {
function words (line 216) | function words(str) {
function def (line 222) | function def(mimes, mode) {
FILE: mode/turtle/turtle.js
function wordRegexp (line 18) | function wordRegexp(words) {
function tokenBase (line 25) | function tokenBase(stream, state) {
function tokenLiteral (line 77) | function tokenLiteral(quote) {
function pushContext (line 91) | function pushContext(state, type, col) {
function popContext (line 94) | function popContext(state) {
FILE: mode/twig/twig.js
function tokenBase (line 24) | function tokenBase (stream, state) {
FILE: mode/vb/vb.js
function wordRegexp (line 17) | function wordRegexp(words) {
function indent (line 54) | function indent(_stream, state) {
function dedent (line 58) | function dedent(_stream, state) {
function tokenBase (line 62) | function tokenBase(stream, state) {
function tokenStringFactory (line 172) | function tokenStringFactory(delimiter) {
function tokenLexer (line 198) | function tokenLexer(stream, state) {
FILE: mode/vbscript/vbscript.js
function wordRegexp (line 28) | function wordRegexp(words) {
function indent (line 108) | function indent(_stream, state) {
function dedent (line 112) | function dedent(_stream, state) {
function tokenBase (line 116) | function tokenBase(stream, state) {
function tokenStringFactory (line 259) | function tokenStringFactory(delimiter) {
function tokenLexer (line 285) | function tokenLexer(stream, state) {
FILE: mode/velocity/velocity.js
function parseWords (line 15) | function parseWords(str) {
function chain (line 28) | function chain(stream, state, f) {
function tokenBase (line 32) | function tokenBase(stream, state) {
function tokenString (line 130) | function tokenString(quote) {
function tokenComment (line 150) | function tokenComment(stream, state) {
function tokenUnparsed (line 162) | function tokenUnparsed(stream, state) {
FILE: mode/verilog/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/verilog/verilog.js
function words (line 29) | function words(str) {
function tokenBase (line 122) | function tokenBase(stream, state) {
function tokenString (line 249) | function tokenString(quote) {
function tokenComment (line 262) | function tokenComment(stream, state) {
function Context (line 274) | function Context(indented, column, type, scopekind, align, prev) {
function pushContext (line 282) | function pushContext(state, col, type, scopekind) {
function popContext (line 287) | function popContext(state) {
function isClosing (line 295) | function isClosing(text, contextClosing) {
function isInsideScopeKind (line 310) | function isInsideScopeKind(ctx, scopekind) {
function buildElectricInputRegEx (line 320) | function buildElectricInputRegEx() {
function tlvScopeStyle (line 554) | function tlvScopeStyle(state, indentation, type) {
function tlvIdentNext (line 561) | function tlvIdentNext(stream) {
FILE: mode/vhdl/vhdl.js
function words (line 15) | function words(str) {
function metaHook (line 27) | function metaHook(stream) {
function tokenBase (line 51) | function tokenBase(stream, state) {
function tokenString (line 93) | function tokenString(quote) {
function tokenString2 (line 105) | function tokenString2(quote) {
function Context (line 118) | function Context(indented, column, type, align, prev) {
function pushContext (line 125) | function pushContext(state, col, type) {
function popContext (line 128) | function popContext(state) {
FILE: mode/wast/test.js
function MT (line 6) | function MT(name) {test.mode(name, mode, Array.prototype.slice.call(argu...
FILE: mode/webidl/webidl.js
function wordRegexp (line 14) | function wordRegexp(words) {
function readToken (line 94) | function readToken(stream, state) {
FILE: mode/xml/test.js
function MT (line 6) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/xml/xml.js
function inText (line 69) | function inText(stream, state) {
function inTag (line 117) | function inTag(stream, state) {
function inAttribute (line 142) | function inAttribute(quote) {
function inBlock (line 156) | function inBlock(style, terminator) {
function doctype (line 169) | function doctype(depth) {
function lower (line 190) | function lower(tagName) {
function Context (line 194) | function Context(state, tagName, startOfLine) {
function popContext (line 202) | function popContext(state) {
function maybePopContext (line 205) | function maybePopContext(state, nextTagName) {
function baseState (line 220) | function baseState(type, stream, state) {
function tagNameState (line 230) | function tagNameState(type, stream, state) {
function closeTagNameState (line 243) | function closeTagNameState(type, stream, state) {
function closeState (line 265) | function closeState(type, _stream, state) {
function closeStateErr (line 273) | function closeStateErr(type, stream, state) {
function attrState (line 278) | function attrState(type, _stream, state) {
function attrEqState (line 297) | function attrEqState(type, stream, state) {
function attrValueState (line 302) | function attrValueState(type, stream, state) {
function attrContinuedState (line 308) | function attrContinuedState(type, stream, state) {
FILE: mode/xquery/test.js
function MT (line 11) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
FILE: mode/xquery/xquery.js
function kw (line 21) | function kw(type) {return {type: type, style: "keyword"};}
function chain (line 82) | function chain(stream, state, f) {
function tokenBase (line 88) | function tokenBase(stream, state) {
function tokenComment (line 221) | function tokenComment(stream, state) {
function tokenString (line 244) | function tokenString(quote, f) {
function tokenVariable (line 284) | function tokenVariable(stream, state) {
function tokenTag (line 301) | function tokenTag(name, isclose) {
function tokenAttribute (line 324) | function tokenAttribute(stream, state) {
function tokenXMLComment (line 359) | function tokenXMLComment(stream, state) {
function tokenCDATA (line 371) | function tokenCDATA(stream, state) {
function tokenPreProcessing (line 382) | function tokenPreProcessing(stream, state) {
function isInXmlBlock (line 394) | function isInXmlBlock(state) { return isIn(state, "tag"); }
function isInXmlAttributeBlock (line 395) | function isInXmlAttributeBlock(state) { return isIn(state, "attribute"); }
function isInXmlConstructor (line 396) | function isInXmlConstructor(state) { return isIn(state, "xmlconstructor"...
function isInString (line 397) | function isInString(state) { return isIn(state, "string"); }
function isEQNameAhead (line 399) | function isEQNameAhead(stream) {
function isIn (line 409) | function isIn(state, type) {
function pushStateStack (line 413) | function pushStateStack(state, newState) {
function popStateStack (line 417) | function popStateStack(state) {
FILE: mode/yacas/yacas.js
function words (line 19) | function words(str) {
function tokenBase (line 42) | function tokenBase(stream, state) {
function tokenString (line 136) | function tokenString(stream, state) {
function tokenComment (line 151) | function tokenComment(stream, state) {
function currentScope (line 163) | function currentScope(state) {
FILE: mode/yaml-frontmatter/yaml-frontmatter.js
function localMode (line 20) | function localMode(state) {
FILE: src/display/Display.js
function Display (line 10) | function Display(place, doc, input, options) {
FILE: src/display/focus.js
function ensureFocus (line 6) | function ensureFocus(cm) {
function delayBlurEvent (line 13) | function delayBlurEvent(cm) {
function onFocus (line 21) | function onFocus(cm, e) {
function onBlur (line 40) | function onBlur(cm, e) {
FILE: src/display/gutters.js
function getGutters (line 6) | function getGutters(gutters, lineNumbers) {
function renderGutters (line 23) | function renderGutters(display) {
function updateGutters (line 40) | function updateGutters(cm) {
FILE: src/display/highlight_worker.js
function startWorker (line 10) | function startWorker(cm, time) {
function highlightWorker (line 15) | function highlightWorker(cm) {
FILE: src/display/line_numbers.js
function alignHorizontally (line 9) | function alignHorizontally(cm) {
function maybeUpdateLineNumberWidth (line 32) | function maybeUpdateLineNumberWidth(cm) {
FILE: src/display/mode_state.js
function loadMode (line 8) | function loadMode(cm) {
function resetModeState (line 13) | function resetModeState(cm) {
FILE: src/display/operations.js
function startOperation (line 23) | function startOperation(cm) {
function endOperation (line 46) | function endOperation(cm) {
function endOperations (line 57) | function endOperations(group) {
function endOperation_R1 (line 71) | function endOperation_R1(op) {
function endOperation_W1 (line 84) | function endOperation_W1(op) {
function endOperation_R2 (line 88) | function endOperation_R2(op) {
function endOperation_W2 (line 109) | function endOperation_W2(op) {
function endOperation_finish (line 134) | function endOperation_finish(op) {
function runInOp (line 173) | function runInOp(cm, f) {
function operation (line 180) | function operation(cm, f) {
function methodOp (line 190) | function methodOp(f) {
function docMethodOp (line 198) | function docMethodOp(f) {
FILE: src/display/scroll_events.js
function wheelEventDelta (line 28) | function wheelEventDelta(e) {
function wheelEventPixels (line 35) | function wheelEventPixels(e) {
function onScrollWheel (line 42) | function onScrollWheel(cm, e) {
FILE: src/display/scrollbars.js
function measureForScrollbars (line 14) | function measureForScrollbars(cm) {
class NativeScrollbars (line 30) | class NativeScrollbars {
method constructor (line 31) | constructor(place, scroll, cm) {
method update (line 50) | update(measure) {
method setScrollLeft (line 88) | setScrollLeft(pos) {
method setScrollTop (line 93) | setScrollTop(pos) {
method zeroWidthHack (line 98) | zeroWidthHack() {
method enableZeroWidthBar (line 106) | enableZeroWidthBar(bar, delay, type) {
method clear (line 124) | clear() {
class NullScrollbars (line 131) | class NullScrollbars {
method update (line 132) | update() { return {bottom: 0, right: 0} }
method setScrollLeft (line 133) | setScrollLeft() {}
method setScrollTop (line 134) | setScrollTop() {}
method clear (line 135) | clear() {}
function updateScrollbars (line 138) | function updateScrollbars(cm, measure) {
function updateScrollbarsInner (line 152) | function updateScrollbarsInner(cm, measure) {
function initScrollbars (line 174) | function initScrollbars(cm) {
FILE: src/display/scrolling.js
function maybeScrollWindow (line 15) | function maybeScrollWindow(cm, rect) {
function scrollPosIntoView (line 36) | function scrollPosIntoView(cm, pos, end, margin) {
function scrollIntoView (line 70) | function scrollIntoView(cm, rect) {
function calculateScrollPos (line 80) | function calculateScrollPos(cm, rect) {
function addToScrollTop (line 111) | function addToScrollTop(cm, top) {
function ensureCursorVisible (line 119) | function ensureCursorVisible(cm) {
function scrollToCoords (line 125) | function scrollToCoords(cm, x, y) {
function scrollToRange (line 131) | function scrollToRange(cm, range) {
function resolveScrollToPos (line 140) | function resolveScrollToPos(cm) {
function scrollToCoordsRange (line 149) | function scrollToCoordsRange(cm, from, to, margin) {
function updateScrollTop (line 161) | function updateScrollTop(cm, val) {
function setScrollTop (line 169) | function setScrollTop(cm, val, forceScroll) {
function setScrollLeft (line 179) | function setScrollLeft(cm, val, isScroller, forceScroll) {
FILE: src/display/selection.js
function updateSelection (line 9) | function updateSelection(cm) {
function prepareSelection (line 13) | function prepareSelection(cm, primary = true) {
function drawSelectionCursor (line 38) | function drawSelectionCursor(cm, head, output) {
function cmpCoords (line 62) | function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }
function drawSelectionRange (line 65) | function drawSelectionRange(cm, range, output) {
function restartBlink (line 160) | function restartBlink(cm) {
FILE: src/display/update_display.js
class DisplayUpdate (line 21) | class DisplayUpdate {
method constructor (line 22) | constructor(cm, viewport, force) {
method signal (line 37) | signal(emitter, type) {
method finish (line 41) | finish() {
function maybeClipScrollbars (line 47) | function maybeClipScrollbars(cm) {
function selectionSnapshot (line 58) | function selectionSnapshot(cm) {
function restoreSelection (line 75) | function restoreSelection(snapshot) {
function updateDisplayIfNeeded (line 93) | function updateDisplayIfNeeded(cm, update) {
function postUpdateDisplay (line 165) | function postUpdateDisplay(cm, update) {
function updateDisplaySimple (line 197) | function updateDisplaySimple(cm, viewport) {
function patchDisplay (line 214) | function patchDisplay(cm, updateNumbersFrom, dims) {
function updateGutterSpace (line 256) | function updateGutterSpace(display) {
function setDocumentHeight (line 263) | function setDocumentHeight(cm, measure) {
FILE: src/display/update_line.js
function updateLineForChanges (line 10) | function updateLineForChanges(cm, lineView, lineN, dims) {
function ensureLineWrapped (line 23) | function ensureLineWrapped(lineView) {
function updateLineBackground (line 34) | function updateLineBackground(cm, lineView) {
function getLineContent (line 49) | function getLineContent(cm, lineView) {
function updateLineText (line 62) | function updateLineText(cm, lineView) {
function updateLineClasses (line 77) | function updateLineClasses(cm, lineView) {
function updateLineGutter (line 87) | function updateLineGutter(cm, lineView, lineN, dims) {
function updateLineWidgets (line 126) | function updateLineWidgets(cm, lineView, dims) {
function buildLineElement (line 137) | function buildLineElement(cm, lineView, lineN, dims) {
function insertLineWidgets (line 151) | function insertLineWidgets(cm, lineView, dims) {
function insertLineWidgetsFor (line 157) | function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
function positionLineWidget (line 173) | function positionLineWidget(widget, node, lineView, dims) {
FILE: src/display/update_lines.js
function updateHeightsInViewport (line 8) | function updateHeightsInViewport(cm) {
function updateWidgetHeight (line 53) | function updateWidgetHeight(line) {
function visibleLines (line 63) | function visibleLines(display, doc, viewport) {
FILE: src/display/view_tracking.js
function regChange (line 13) | function regChange(cm, from, to, lendiff) {
function regLineChange (line 78) | function regLineChange(cm, line, type) {
function resetView (line 92) | function resetView(cm) {
function viewCuttingPoint (line 98) | function viewCuttingPoint(cm, oldN, newN, dir) {
function adjustView (line 125) | function adjustView(cm, from, to) {
function countDirtyView (line 146) | function countDirtyView(cm) {
FILE: src/edit/CodeMirror.js
function CodeMirror (line 29) | function CodeMirror(place, options) {
function registerEventHandlers (line 106) | function registerEventHandlers(cm) {
FILE: src/edit/commands.js
function lineStart (line 156) | function lineStart(cm, lineN) {
function lineEnd (line 162) | function lineEnd(cm, lineN) {
function lineStartSmart (line 168) | function lineStartSmart(cm, pos) {
FILE: src/edit/deleteNearSelection.js
function deleteNearSelection (line 9) | function deleteNearSelection(cm, compute) {
FILE: src/edit/drop_events.js
function onDrop (line 19) | function onDrop(e) {
function onDragStart (line 90) | function onDragStart(cm, e) {
function onDragOver (line 113) | function onDragOver(cm, e) {
function clearDragCursor (line 125) | function clearDragCursor(cm) {
FILE: src/edit/fromTextArea.js
function fromTextArea (line 6) | function fromTextArea(textarea, options) {
FILE: src/edit/global_events.js
function forEachCodeMirror (line 8) | function forEachCodeMirror(f) {
function ensureGlobalHandlers (line 21) | function ensureGlobalHandlers() {
function registerGlobalHandlers (line 26) | function registerGlobalHandlers() {
function onResize (line 39) | function onResize(cm) {
FILE: src/edit/key_events.js
function doHandleBinding (line 14) | function doHandleBinding(cm, bound, dropShift) {
function lookupKeyForEditor (line 34) | function lookupKeyForEditor(cm, name, handle) {
function dispatchKey (line 48) | function dispatchKey(cm, name, e, handle) {
function dispatchKeyInner (line 66) | function dispatchKeyInner(cm, name, e, handle) {
function handleKeyBinding (line 83) | function handleKeyBinding(cm, e) {
function handleCharBinding (line 102) | function handleCharBinding(cm, e, ch) {
function onKeyDown (line 107) | function onKeyDown(e) {
function showCrossHair (line 131) | function showCrossHair(cm) {
function onKeyUp (line 146) | function onKeyUp(e) {
function onKeyPress (line 151) | function onKeyPress(e) {
FILE: src/edit/legacy.js
function addLegacyProps (line 20) | function addLegacyProps(CodeMirror) {
FILE: src/edit/methods.js
function findPosH (line 468) | function findPosH(doc, pos, dir, unit, visually) {
function findPosV (line 537) | function findPosV(cm, pos, dir, unit) {
FILE: src/edit/mouse_events.js
constant DOUBLECLICK_DELAY (line 22) | const DOUBLECLICK_DELAY = 400
class PastClick (line 24) | class PastClick {
method constructor (line 25) | constructor(time, pos, button) {
method compare (line 31) | compare(time, pos, button) {
function clickRepeat (line 38) | function clickRepeat(pos, button) {
function onMouseDown (line 59) | function onMouseDown(e) {
function handleMappedButton (line 96) | function handleMappedButton(cm, button, pos, repeat, event) {
function configureMouse (line 116) | function configureMouse(cm, repeat, event) {
function leftButtonDown (line 129) | function leftButtonDown(cm, pos, repeat, event) {
function leftButtonStartDrag (line 147) | function leftButtonStartDrag(cm, event, pos, behavior) {
function rangeForUnit (line 190) | function rangeForUnit(cm, pos, unit) {
function leftButtonSelect (line 199) | function leftButtonSelect(cm, event, start, behavior) {
function bidiSimplify (line 337) | function bidiSimplify(cm, range) {
function gutterEvent (line 370) | function gutterEvent(cm, e, type, prevent) {
function clickInGutter (line 399) | function clickInGutter(cm, e) {
function onContextMenu (line 408) | function onContextMenu(cm, e) {
function contextMenuInGutter (line 414) | function contextMenuInGutter(cm, e) {
FILE: src/edit/options.js
function defineOptions (line 24) | function defineOptions(CodeMirror) {
function dragDropChanged (line 168) | function dragDropChanged(cm, value, old) {
function wrappingChanged (line 181) | function wrappingChanged(cm) {
FILE: src/edit/utils.js
function themeChanged (line 3) | function themeChanged(cm) {
FILE: src/input/ContentEditableInput.js
class ContentEditableInput (line 19) | class ContentEditableInput {
method constructor (line 20) | constructor(cm) {
method init (line 29) | init(display) {
method screenReaderLabelChanged (line 112) | screenReaderLabelChanged(label) {
method prepareSelection (line 121) | prepareSelection() {
method showSelection (line 127) | showSelection(info, takeFocus) {
method getSelection (line 133) | getSelection() {
method showPrimarySelection (line 137) | showPrimarySelection() {
method startGracePeriod (line 188) | startGracePeriod() {
method showMultipleSelections (line 197) | showMultipleSelections(info) {
method rememberSelection (line 202) | rememberSelection() {
method selectionInEditor (line 208) | selectionInEditor() {
method focus (line 215) | focus() {
method blur (line 222) | blur() { this.div.blur() }
method getField (line 223) | getField() { return this.div }
method supportsTouch (line 225) | supportsTouch() { return true }
method receivedFocus (line 227) | receivedFocus() {
method selectionChanged (line 243) | selectionChanged() {
method pollSelection (line 249) | pollSelection() {
method pollContent (line 274) | pollContent() {
method ensurePolled (line 345) | ensurePolled() {
method reset (line 348) | reset() {
method forceCompositionEnd (line 351) | forceCompositionEnd() {
method readFromDOMSoon (line 359) | readFromDOMSoon() {
method updateFromDOM (line 371) | updateFromDOM() {
method setUneditable (line 376) | setUneditable(node) {
method onKeyPress (line 380) | onKeyPress(e) {
method readOnlyChanged (line 387) | readOnlyChanged(val) {
method onContextMenu (line 391) | onContextMenu() {}
method resetPosition (line 392) | resetPosition() {}
function posToDOM (line 397) | function posToDOM(cm, pos) {
function isInGutter (line 413) | function isInGutter(node) {
function badPos (line 419) | function badPos(pos, bad) { if (bad) pos.bad = true; return pos }
function domTextBetween (line 421) | function domTextBetween(cm, from, to, fromLine, toLine) {
function domToPos (line 474) | function domToPos(cm, node, offset) {
function locateNodeInLineView (line 493) | function locateNodeInLineView(lineView, node, offset) {
FILE: src/input/TextareaInput.js
class TextareaInput (line 16) | class TextareaInput {
method constructor (line 17) | constructor(cm) {
method init (line 34) | init(display) {
method createField (line 114) | createField(_display) {
method screenReaderLabelChanged (line 124) | screenReaderLabelChanged(label) {
method prepareSelection (line 133) | prepareSelection() {
method showSelection (line 151) | showSelection(drawn) {
method reset (line 163) | reset(typing) {
method getField (line 180) | getField() { return this.textarea }
method supportsTouch (line 182) | supportsTouch() { return false }
method focus (line 184) | focus() {
method blur (line 191) | blur() { this.textarea.blur() }
method resetPosition (line 193) | resetPosition() {
method receivedFocus (line 197) | receivedFocus() { this.slowPoll() }
method slowPoll (line 201) | slowPoll() {
method fastPoll (line 212) | fastPoll() {
method poll (line 229) | poll() {
method ensurePolled (line 278) | ensurePolled() {
method onKeyPress (line 282) | onKeyPress() {
method onContextMenu (line 287) | onContextMenu(e) {
method readOnlyChanged (line 371) | readOnlyChanged(val) {
method setUneditable (line 377) | setUneditable() {}
FILE: src/input/indent.js
function indentLine (line 14) | function indentLine(cm, n, how, aggressive) {
FILE: src/input/input.js
function setLastCopied (line 19) | function setLastCopied(newLastCopied) {
function applyTextInput (line 23) | function applyTextInput(cm, inserted, deleted, sel, origin) {
function handlePaste (line 71) | function handlePaste(e, cm) {
function triggerElectric (line 81) | function triggerElectric(cm, inserted) {
function copyableRanges (line 105) | function copyableRanges(cm) {
function disableBrowserMagic (line 116) | function disableBrowserMagic(field, spellcheck, autocorrect, autocapital...
function hiddenTextarea (line 122) | function hiddenTextarea() {
FILE: src/input/keymap.js
function normalizeKeyName (line 50) | function normalizeKeyName(name) {
function normalizeKeyMap (line 74) | function normalizeKeyMap(keymap) {
function lookupKey (line 101) | function lookupKey(key, map, handle, context) {
function isModifierKey (line 120) | function isModifierKey(value) {
function addModifierNames (line 125) | function addModifierNames(name, event, noShift) {
function keyName (line 135) | function keyName(event, noShift) {
function getKeyMap (line 145) | function getKeyMap(val) {
FILE: src/input/movement.js
function moveCharLogically (line 6) | function moveCharLogically(line, ch, dir) {
function moveLogically (line 11) | function moveLogically(line, start, dir) {
function endOfLine (line 16) | function endOfLine(visually, cm, lineObj, lineNo, dir) {
function moveVisually (line 44) | function moveVisually(cm, line, start, dir) {
FILE: src/line/highlight.js
class SavedContext (line 8) | class SavedContext {
method constructor (line 9) | constructor(state, lookAhead) {
class Context (line 15) | class Context {
method constructor (line 16) | constructor(doc, state, line, lookAhead) {
method lookAhead (line 25) | lookAhead(n) {
method baseToken (line 31) | baseToken(n) {
method nextLine (line 40) | nextLine() {
method fromSaved (line 45) | static fromSaved(doc, saved, line) {
method save (line 52) | save(copy) {
function highlightLine (line 63) | function highlightLine(cm, line, context, forceToEnd) {
function getLineStyles (line 106) | function getLineStyles(cm, line, updateFrontier) {
function getContextBefore (line 122) | function getContextBefore(cm, n, precise) {
function processLine (line 142) | function processLine(cm, text, context, startAt) {
function callBlankLine (line 153) | function callBlankLine(mode, state) {
function readToken (line 160) | function readToken(mode, stream, state, inner) {
class Token (line 169) | class Token {
method constructor (line 170) | constructor(stream, type, state) {
function takeToken (line 179) | function takeToken(cm, pos, precise, asArray) {
function extractLineClasses (line 193) | function extractLineClasses(type, output) {
function runMode (line 208) | function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
function findStartLine (line 252) | function findStartLine(cm, n, precise) {
function retreatFrontier (line 269) | function retreatFrontier(doc, n) {
FILE: src/line/line_data.js
class Line (line 16) | class Line {
method constructor (line 17) | constructor(text, markedSpans, estimateHeight) {
method lineNo (line 23) | lineNo() { return lineNo(this) }
function updateLine (line 30) | function updateLine(line, text, markedSpans, estimateHeight) {
function cleanUpLine (line 42) | function cleanUpLine(line) {
function interpretTokenStyle (line 51) | function interpretTokenStyle(style, options) {
function buildLineContent (line 63) | function buildLineContent(cm, lineView) {
function defaultSpecialCharPlaceholder (line 121) | function defaultSpecialCharPlaceholder(ch) {
function buildToken (line 130) | function buildToken(builder, text, style, startStyle, endStyle, css, att...
function splitSpaces (line 197) | function splitSpaces(text, trailingBefore) {
function buildTokenBadBidi (line 212) | function buildTokenBadBidi(inner, order) {
function buildCollapsedSpan (line 232) | function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
function insertLineContent (line 250) | function insertLineContent(line, builder, styles) {
function LineView (line 329) | function LineView(doc, line, lineN) {
function buildViewArray (line 341) | function buildViewArray(cm, from, to) {
FILE: src/line/pos.js
function Pos (line 4) | function Pos(line, ch, sticky = null) {
function cmp (line 13) | function cmp(a, b) { return a.line - b.line || a.ch - b.ch }
function equalCursorPos (line 15) | function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b)...
function copyPos (line 17) | function copyPos(x) {return Pos(x.line, x.ch)}
function maxPos (line 18) | function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }
function minPos (line 19) | function minPos(a, b) { return cmp(a, b) < 0 ? a : b }
function clipLine (line 23) | function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.fi...
function clipPos (line 24) | function clipPos(doc, pos) {
function clipToLen (line 30) | function clipToLen(pos, linelen) {
function clipPosArray (line 36) | function clipPosArray(doc, array) {
FILE: src/line/saw_special_spans.js
function seeReadOnlySpans (line 4) | function seeReadOnlySpans() {
function seeCollapsedSpans (line 8) | function seeCollapsedSpans() {
FILE: src/line/spans.js
function MarkedSpan (line 9) | function MarkedSpan(marker, from, to) {
function getMarkedSpanFor (line 15) | function getMarkedSpanFor(spans, marker) {
function removeMarkedSpan (line 24) | function removeMarkedSpan(spans, span) {
function addMarkedSpan (line 32) | function addMarkedSpan(line, span, op) {
function markedSpansBefore (line 47) | function markedSpansBefore(old, startCh, isInsert) {
function markedSpansAfter (line 59) | function markedSpansAfter(old, endCh, isInsert) {
function stretchSpansOverChange (line 79) | function stretchSpansOverChange(doc, change) {
function clearEmptySpans (line 141) | function clearEmptySpans(spans) {
function removeReadOnlyRanges (line 152) | function removeReadOnlyRanges(doc, from, to) {
function detachMarkedSpans (line 181) | function detachMarkedSpans(line) {
function attachMarkedSpans (line 188) | function attachMarkedSpans(line, spans) {
function extraLeft (line 197) | function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }
function extraRight (line 198) | function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }
function compareCollapsedMarkers (line 203) | function compareCollapsedMarkers(a, b) {
function collapsedSpanAtSide (line 216) | function collapsedSpanAtSide(line, start) {
function collapsedSpanAtStart (line 226) | function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, t...
function collapsedSpanAtEnd (line 227) | function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, fal...
function collapsedSpanAround (line 229) | function collapsedSpanAround(line, ch) {
function conflictingCollapsedRange (line 242) | function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
function visualLine (line 262) | function visualLine(line) {
function visualLineEnd (line 269) | function visualLineEnd(line) {
function visualLineContinued (line 278) | function visualLineContinued(line) {
function visualLineNo (line 289) | function visualLineNo(doc, lineN) {
function visualLineEndNo (line 297) | function visualLineEndNo(doc, lineN) {
function lineIsHidden (line 309) | function lineIsHidden(doc, line) {
function lineIsHiddenInner (line 320) | function lineIsHiddenInner(doc, line, span) {
function heightAtLine (line 337) | function heightAtLine(lineObj) {
function lineLength (line 359) | function lineLength(line) {
function findMaxLine (line 378) | function findMaxLine(cm) {
FILE: src/line/utils_line.js
function getLine (line 4) | function getLine(doc, n) {
function getBetween (line 20) | function getBetween(doc, start, end) {
function getLines (line 32) | function getLines(doc, from, to) {
function updateLineHeight (line 40) | function updateLineHeight(line, height) {
function lineNo (line 47) | function lineNo(line) {
function lineAtHeight (line 61) | function lineAtHeight(chunk, h) {
function isLine (line 81) | function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}
function lineNumberFor (line 83) | function lineNumberFor(options, i) {
FILE: src/measurement/position_measurement.js
function paddingTop (line 17) | function paddingTop(display) {return display.lineSpace.offsetTop}
function paddingVert (line 18) | function paddingVert(display) {return display.mover.offsetHeight - displ...
function paddingH (line 19) | function paddingH(display) {
function scrollGap (line 28) | function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }
function displayWidth (line 29) | function displayWidth(cm) {
function displayHeight (line 32) | function displayHeight(cm) {
function ensureLineHeights (line 40) | function ensureLineHeights(cm, lineView, rect) {
function mapFromLineView (line 61) | function mapFromLineView(lineView, line, lineN) {
function updateExternalMeasurement (line 76) | function updateExternalMeasurement(cm, line) {
function measureChar (line 89) | function measureChar(cm, line, ch, bias) {
function findViewForLine (line 94) | function findViewForLine(cm, lineN) {
function prepareMeasureForLine (line 107) | function prepareMeasureForLine(cm, line) {
function measureCharPrepared (line 129) | function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
function nodeAndOffsetInLineMap (line 151) | function nodeAndOffsetInLineMap(map, ch, bias) {
function getUsefulRect (line 189) | function getUsefulRect(rects, bias) {
function measureCharInner (line 199) | function measureCharInner(cm, prepared, ch, bias) {
function maybeUpdateRectForZooming (line 252) | function maybeUpdateRectForZooming(measure, rect) {
function clearLineMeasurementCacheFor (line 262) | function clearLineMeasurementCacheFor(lineView) {
function clearLineMeasurementCache (line 271) | function clearLineMeasurementCache(cm) {
function clearCaches (line 278) | function clearCaches(cm) {
function pageScrollX (line 285) | function pageScrollX(doc) {
function pageScrollY (line 292) | function pageScrollY(doc) {
function widgetTopHeight (line 297) | function widgetTopHeight(lineObj) {
function intoCoordSystem (line 308) | function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
function fromCoordSystem (line 330) | function fromCoordSystem(cm, coords, context) {
function charCoords (line 347) | function charCoords(cm, pos, context, lineObj, bias) {
function cursorCoords (line 368) | function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHei...
function estimateCoords (line 399) | function estimateCoords(cm, pos) {
function PosWithInfo (line 414) | function PosWithInfo(line, ch, sticky, outside, xRel) {
function coordsChar (line 423) | function coordsChar(cm, x, y) {
function wrappedLineExtent (line 443) | function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
function wrappedLineExtentChar (line 451) | function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
function boxIsAfter (line 459) | function boxIsAfter(box, x, y, left) {
function coordsCharInner (line 463) | function coordsCharInner(cm, lineObj, lineNo, x, y) {
function coordsBidiPart (line 530) | function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, ...
function coordsBidiPartWrapped (line 554) | function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, or...
function textHeight (line 587) | function textHeight(display) {
function charWidth (line 607) | function charWidth(display) {
function getDimensions (line 619) | function getDimensions(cm) {
function compensateForHScroll (line 637) | function compensateForHScroll(display) {
function estimateHeight (line 644) | function estimateHeight(cm) {
function estimateLineHeights (line 662) | function estimateLineHeights(cm) {
function posFromMouse (line 675) | function posFromMouse(cm, e, liberal, forRect) {
function findViewIndex (line 693) | function findViewIndex(cm, n) {
FILE: src/measurement/widgets.js
function widgetHeight (line 4) | function widgetHeight(widget) {
function eventInWidget (line 20) | function eventInWidget(display, e) {
FILE: src/model/change_measurement.js
function changeEnd (line 8) | function changeEnd(change) {
function adjustForChange (line 16) | function adjustForChange(pos, change) {
function computeSelAfterChange (line 25) | function computeSelAfterChange(doc, change) {
function offsetPos (line 35) | function offsetPos(pos, old, nw) {
function computeReplacedSel (line 44) | function computeReplacedSel(doc, changes, hint) {
FILE: src/model/changes.js
function filterChange (line 23) | function filterChange(doc, change, update) {
function makeChange (line 50) | function makeChange(doc, change, ignoreReadOnly) {
function makeChangeInner (line 72) | function makeChangeInner(doc, change) {
function makeChangeFromHistory (line 90) | function makeChangeFromHistory(doc, type, allowSelectionOnly) {
function shiftDoc (line 160) | function shiftDoc(doc, distance) {
function makeChangeSingleDoc (line 176) | function makeChangeSingleDoc(doc, change, selAfter, spans) {
function makeChangeSingleDocInEditor (line 212) | function makeChangeSingleDocInEditor(cm, change, spans) {
function replaceRange (line 270) | function replaceRange(doc, code, from, to, origin) {
function rebaseHistSelSingle (line 279) | function rebaseHistSelSingle(pos, from, to, diff) {
function rebaseHistArray (line 295) | function rebaseHistArray(array, from, to, diff) {
function rebaseHist (line 323) | function rebaseHist(hist, change) {
function changeLine (line 332) | function changeLine(doc, handle, changeType, op) {
FILE: src/model/chunk.js
function LeafChunk (line 18) | function LeafChunk(lines) {
method chunkSize (line 30) | chunkSize() { return this.lines.length }
method removeInner (line 33) | removeInner(at, n) {
method collapse (line 44) | collapse(lines) {
method insertInner (line 50) | insertInner(at, lines, height) {
method iterN (line 57) | iterN(at, n, op) {
function BranchChunk (line 63) | function BranchChunk(children) {
method chunkSize (line 77) | chunkSize() { return this.size }
method removeInner (line 79) | removeInner(at, n) {
method collapse (line 103) | collapse(lines) {
method insertInner (line 107) | insertInner(at, lines, height) {
method maybeSpill (line 134) | maybeSpill() {
method iterN (line 156) | iterN(at, n, op) {
FILE: src/model/document_data.js
function isWholeLineUpdate (line 17) | function isWholeLineUpdate(doc, change) {
function updateDoc (line 23) | function updateDoc(doc, change, markedSpans, estimateHeight) {
function linkedDocs (line 75) | function linkedDocs(doc, f, sharedHistOnly) {
function attachDoc (line 90) | function attachDoc(cm, doc) {
function setDirectionClass (line 103) | function setDirectionClass(cm) {
function directionChanged (line 107) | function directionChanged(cm) {
FILE: src/model/history.js
function History (line 11) | function History(prev) {
function historyChangeFromChange (line 28) | function historyChangeFromChange(doc, change) {
function clearSelectionEvents (line 37) | function clearSelectionEvents(array) {
function lastChangeEvent (line 47) | function lastChangeEvent(hist, force) {
function addChangeToHistory (line 62) | function addChangeToHistory(doc, change, selAfter, opId) {
function selectionEventCanBeMerged (line 105) | function selectionEventCanBeMerged(doc, origin, prev, sel) {
function addSelectionToHistory (line 118) | function addSelectionToHistory(doc, sel, opId, options) {
function pushSelectionToHistory (line 140) | function pushSelectionToHistory(sel, dest) {
function attachLocalSpans (line 147) | function attachLocalSpans(doc, change, from, to) {
function removeClearedSpans (line 158) | function removeClearedSpans(spans) {
function getOldSpans (line 169) | function getOldSpans(doc, change) {
function mergeOldSpans (line 182) | function mergeOldSpans(doc, change) {
function copyHistoryArray (line 206) | function copyHistoryArray(events, newGroup, instantiateSel) {
FILE: src/model/line_widget.js
class LineWidget (line 13) | class LineWidget {
method constructor (line 14) | constructor(doc, node, options) {
method clear (line 21) | clear() {
method changed (line 37) | changed() {
function adjustScrollWhenAboveVisible (line 54) | function adjustScrollWhenAboveVisible(cm, line, diff) {
function addLineWidget (line 59) | function addLineWidget(doc, handle, node, options) {
FILE: src/model/mark_text.js
class TextMarker (line 35) | class TextMarker {
method constructor (line 36) | constructor(doc, type) {
method clear (line 44) | clear() {
method find (line 91) | find(side, lineObj) {
method changed (line 111) | changed() {
method attachLine (line 133) | attachLine(line) {
method detachLine (line 142) | detachLine(line) {
function markText (line 153) | function markText(doc, from, to, options, type) {
class SharedTextMarker (line 228) | class SharedTextMarker {
method constructor (line 229) | constructor(markers, primary) {
method clear (line 236) | clear() {
method find (line 244) | find(side, lineObj) {
function markTextShared (line 250) | function markTextShared(doc, from, to, options, type) {
function findSharedMarkers (line 265) | function findSharedMarkers(doc) {
function copySharedMarkers (line 269) | function copySharedMarkers(doc, markers) {
function detachSharedMarkers (line 281) | function detachSharedMarkers(markers) {
FILE: src/model/selection.js
class Selection (line 9) | class Selection {
method constructor (line 10) | constructor(ranges, primIndex) {
method primary (line 15) | primary() { return this.ranges[this.primIndex] }
method equals (line 17) | equals(other) {
method deepCopy (line 27) | deepCopy() {
method somethingSelected (line 34) | somethingSelected() {
method contains (line 40) | contains(pos, end) {
class Range (line 51) | class Range {
method constructor (line 52) | constructor(anchor, head) {
method from (line 56) | from() { return minPos(this.anchor, this.head) }
method to (line 57) | to() { return maxPos(this.anchor, this.head) }
method empty (line 58) | empty() { return this.head.line == this.anchor.line && this.head.ch ==...
function normalizeSelection (line 64) | function normalizeSelection(cm, ranges, primIndex) {
function simpleSelection (line 82) | function simpleSelection(anchor, head) {
FILE: src/model/selection_updates.js
function extendRange (line 19) | function extendRange(range, head, other, extend) {
function extendSelection (line 38) | function extendSelection(doc, head, other, options, extend) {
function extendSelections (line 45) | function extendSelections(doc, heads, options) {
function replaceOneSelection (line 55) | function replaceOneSelection(doc, i, range, options) {
function setSimpleSelection (line 62) | function setSimpleSelection(doc, anchor, head, options) {
function filterSelectionChange (line 68) | function filterSelectionChange(doc, sel, options) {
function setSelectionReplaceHistory (line 85) | function setSelectionReplaceHistory(doc, sel, options) {
function setSelection (line 96) | function setSelection(doc, sel, options) {
function setSelectionNoUndo (line 101) | function setSelectionNoUndo(doc, sel, options) {
function setSelectionInner (line 113) | function setSelectionInner(doc, sel) {
function reCheckSelection (line 128) | function reCheckSelection(doc) {
function skipAtomicInSelection (line 134) | function skipAtomicInSelection(doc, sel, bias, mayClear) {
function skipAtomicInner (line 149) | function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
function skipAtomic (line 189) | function skipAtomic(doc, pos, oldPos, bias, mayClear) {
function movePos (line 202) | function movePos(doc, pos, dir, line) {
function selectAll (line 214) | function selectAll(cm) {
FILE: src/modes.js
function defineMode (line 9) | function defineMode(name, mode) {
function defineMIME (line 15) | function defineMIME(mime, spec) {
function resolveMode (line 21) | function resolveMode(spec) {
function getMode (line 40) | function getMode(options, spec) {
function extendMode (line 64) | function extendMode(mode, properties) {
function copyState (line 69) | function copyState(mode, state) {
function innerMode (line 83) | function innerMode(mode, state) {
function startState (line 94) | function startState(mode, a1, a2) {
FILE: src/util/StringStream.js
class StringStream (line 8) | class StringStream {
method constructor (line 9) | constructor(string, tabSize, lineOracle) {
method eol (line 18) | eol() {return this.pos >= this.string.length}
method sol (line 19) | sol() {return this.pos == this.lineStart}
method peek (line 20) | peek() {return this.string.charAt(this.pos) || undefined}
method next (line 21) | next() {
method eat (line 25) | eat(match) {
method eatWhile (line 32) | eatWhile(match) {
method eatSpace (line 37) | eatSpace() {
method skipToEnd (line 42) | skipToEnd() {this.pos = this.string.length}
method skipTo (line 43) | skipTo(ch) {
method backUp (line 47) | backUp(n) {this.pos -= n}
method column (line 48) | column() {
method indentation (line 55) | indentation() {
method match (line 59) | match(pattern, consume, caseInsensitive) {
method current (line 74) | current(){return this.string.slice(this.start, this.pos)}
method hideFirstChars (line 75) | hideFirstChars(n, inner) {
method lookAhead (line 80) | lookAhead(n) {
method baseToken (line 84) | baseToken() {
FILE: src/util/bidi.js
function iterateBidiSections (line 5) | function iterateBidiSections(order, from, to, f) {
function getBidiPartAt (line 19) | function getBidiPartAt(order, ch, sticky) {
function charType (line 65) | function charType(code) {
function BidiSpan (line 78) | function BidiSpan(level, from, to) {
function getOrder (line 211) | function getOrder(line, direction) {
FILE: src/util/dom.js
function classTest (line 3) | function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)...
function removeChildren (line 14) | function removeChildren(e) {
function removeChildrenAndAdd (line 20) | function removeChildrenAndAdd(parent, e) {
function elt (line 24) | function elt(tag, content, className, style) {
function eltP (line 33) | function eltP(tag, content, className, style) {
function contains (line 56) | function contains(parent, child) {
function activeElt (line 67) | function activeElt(rootNode) {
function addClass (line 83) | function addClass(node, cls) {
function joinClasses (line 87) | function joinClasses(a, b) {
function doc (line 100) | function doc(cm) { return cm.display.wrapper.ownerDocument }
function root (line 102) | function root(cm) {
function rootNode (line 106) | function rootNode(element) {
function win (line 111) | function win(cm) { return doc(cm).defaultView }
FILE: src/util/event.js
function getHandlers (line 22) | function getHandlers(emitter, type) {
function off (line 26) | function off(emitter, type, f) {
function signal (line 41) | function signal(emitter, type /*, values...*/) {
function signalDOMEvent (line 51) | function signalDOMEvent(cm, e, override) {
function signalCursorActivity (line 58) | function signalCursorActivity(cm) {
function hasHandler (line 66) | function hasHandler(emitter, type) {
function eventMixin (line 72) | function eventMixin(ctor) {
function e_preventDefault (line 80) | function e_preventDefault(e) {
function e_stopPropagation (line 84) | function e_stopPropagation(e) {
function e_defaultPrevented (line 88) | function e_defaultPrevented(e) {
function e_stop (line 91) | function e_stop(e) {e_preventDefault(e); e_stopPropagation(e)}
function e_target (line 93) | function e_target(e) {return e.target || e.srcElement}
function e_button (line 94) | function e_button(e) {
FILE: src/util/feature_detection.js
function zeroWidthElement (line 14) | function zeroWidthElement(measure) {
function hasBadBidiRects (line 29) | function hasBadBidiRects(measure) {
function hasBadZoomedRects (line 78) | function hasBadZoomedRects(measure) {
FILE: src/util/misc.js
function bind (line 1) | function bind(f) {
function copyObj (line 6) | function copyObj(obj, target, overwrite) {
function countColumn (line 16) | function countColumn(string, end, tabSize, startIndex, startValue) {
class Delayed (line 31) | class Delayed {
method constructor (line 32) | constructor() {
method onTimeout (line 38) | onTimeout(self) {
method set (line 46) | set(ms, f) {
function indexOf (line 57) | function indexOf(array, elt) {
function findColumn (line 75) | function findColumn(string, goal, tabSize) {
function spaceStr (line 90) | function spaceStr(n) {
function lst (line 96) | function lst(arr) { return arr[arr.length-1] }
function map (line 98) | function map(array, f) {
function insertSorted (line 104) | function insertSorted(array, value, score) {
function nothing (line 110) | function nothing() {}
function createObj (line 112) | function createObj(base, props) {
function isWordCharBasic (line 125) | function isWordCharBasic(ch) {
function isWordChar (line 129) | function isWordChar(ch, helper) {
function isEmpty (line 135) | function isEmpty(obj) {
function isExtendingChar (line 146) | function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendi...
function skipExtendingChars (line 149) | function skipExtendingChars(str, pos, dir) {
function findFirst (line 157) | function findFirst(pred, from, to) {
FILE: src/util/operation_group.js
function pushOperation (line 5) | function pushOperation(op) {
function fireCallbacksForOps (line 16) | function fireCallbacksForOps(group) {
function finishOperation (line 32) | function finishOperation(op, endCb) {
function signalLater (line 52) | function signalLater(emitter, type /*, values...*/) {
function fireOrphanDelayed (line 68) | function fireOrphanDelayed() {
FILE: test/annotatescrollbar.js
function test (line 4) | function test(name, run, content, query, expected) {
function doFold (line 36) | function doFold(cm) {
FILE: test/comment_test.js
function test (line 4) | function test(name, mode, run, before, after) {
FILE: test/contenteditable_test.js
function findTextNode (line 7) | function findTextNode(dom, text) {
function lineElt (line 19) | function lineElt(node) {
FILE: test/doc_test.js
function instantiateSpec (line 3) | function instantiateSpec(spec, place, opts) {
function clone (line 30) | function clone(obj, props) {
function eqAll (line 39) | function eqAll(val) {
function testDoc (line 48) | function testDoc(name, spec, run, opts, expectFail) {
function testBasic (line 73) | function testBasic(a, b) {
FILE: test/driver.js
function Failure (line 3) | function Failure(why) {this.message = why;}
function indexOf (line 6) | function indexOf(collection, elt) {
function test (line 13) | function test(name, run, expectedFail) {
function testCM (line 26) | function testCM(name, run, opts, expectedFail) {
function runTests (line 43) | function runTests(callback) {
function label (line 97) | function label(str, msg) {
function eq (line 101) | function eq(a, b, msg) {
function notEq (line 104) | function notEq(a, b, msg) {
function near (line 107) | function near(a, b, margin, msg) {
function eqCharPos (line 111) | function eqCharPos(a, b, msg) {
function eqCursorPos (line 118) | function eqCursorPos(a, b, msg) {
function is (line 122) | function is(a, msg) {
function countTests (line 126) | function countTests() {
function parseTestFilter (line 141) | function parseTestFilter(s) {
FILE: test/emacs_test.js
function fakeEvent (line 8) | function fakeEvent(keyName) {
function sim (line 30) | function sim(name, start /*, actions... */) {
function dialog (line 42) | function dialog(answer) { return function(cm) { cm.openDialog = function...
function at (line 44) | function at(line, ch, sticky) { return function(cm) { eqCursorPos(cm.get...
function txt (line 45) | function txt(str) { return function(cm) { eq(cm.getValue(), str); }; }
FILE: test/html-hint-test.js
function escapeHtmlList (line 33) | function escapeHtmlList(o) {
function test (line 41) | function test(name, spec) {
function deepCompare (line 68) | function deepCompare(a, b) {
FILE: test/mode_test.js
function findSingle (line 22) | function findSingle(str, pos, ch) {
function parseTokens (line 32) | function parseTokens(strs) {
function esc (line 69) | function esc(str) {
function compare (line 73) | function compare(text, expected, mode) {
function stringify (line 104) | function stringify(obj) {
function highlight (line 117) | function highlight(string, mode) {
function highlightOutputsDifferent (line 161) | function highlightOutputsDifferent(o1, o2) {
function prettyPrintOutputTable (line 168) | function prettyPrintOutputTable(output, diffAt) {
FILE: test/multi_test.js
function hasSelections (line 4) | function hasSelections(cm) {
function hasCursors (line 16) | function hasCursors(cm) {
function select (line 141) | function select(cm) {
FILE: test/run.js
function sleep (line 41) | function sleep(n) { return new Promise(acc => setTimeout(acc, n)) }
FILE: test/scroll_test.js
function barH (line 18) | function barH(cm) { return byClassName(cm.getWrapperElement(), "CodeMirr...
function barV (line 19) | function barV(cm) { return byClassName(cm.getWrapperElement(), "CodeMirr...
function displayBottom (line 21) | function displayBottom(cm, scrollbar) {
function displayRight (line 28) | function displayRight(cm, scrollbar) {
function testMovedownFixed (line 35) | function testMovedownFixed(cm, hScroll) {
function testMovedownResize (line 50) | function testMovedownResize(cm, hScroll) {
function testMoveright (line 66) | function testMoveright(cm, wrap, scroll) {
FILE: test/search_test.js
function run (line 4) | function run(doc, query, options) {
function test (line 22) | function test(name, f) { window.test("search_" + name, f) }
FILE: test/sql-hint-test.js
function test (line 53) | function test(name, spec) {
function deepCompare (line 286) | function deepCompare(a, b) {
FILE: test/sublime_test.js
function stTest (line 7) | function stTest(name) {
function at (line 24) | function at(line, ch, msg) {
function val (line 32) | function val(content, msg) {
function argsToRanges (line 36) | function argsToRanges(args) {
function setSel (line 45) | function setSel() {
function hasSel (line 50) | function hasSel() {
FILE: test/test.js
function forEach (line 5) | function forEach(arr, f) {
function addDoc (line 9) | function addDoc(cm, width, height) {
function byClassName (line 16) | function byClassName(elt, cls) {
function p (line 417) | function p(v) { return v && Pos(v[0], v[1]); }
function present (line 549) | function present() {
function present (line 561) | function present() {
function p (line 573) | function p(v) { return v && Pos(v[0], v[1]); }
function add (line 628) | function add(insertLeft) {
function test (line 686) | function test(line, ch, msg) {
function foldLines (line 810) | function foldLines(cm, start, end, autoClear) {
function enterPress (line 915) | function enterPress() {
function fold (line 973) | function fold(ll, cl, lr, cr) {
function fakeKey (line 1284) | function fakeKey(expected, code, props) {
function scrollbarWidth (line 1593) | function scrollbarWidth(measure) {
function w (line 1612) | function w() {
function cls (line 1757) | function cls(line, text, bg, wrap, gutter) {
function atom (line 1803) | function atom(ll, cl, lr, cr, li, ri, ls, rs) {
function mark (line 1938) | function mark(ll, cl, lr, cr, at) {
function sendKey (line 2006) | function sendKey(code) {
function mouseDown (line 2037) | function mouseDown(cm, button, pos, mods) {
function send (line 2059) | function send(button, mods) { mouseDown(cm, button, Pos(1, 2), mods) }
function notAtEnd (line 2133) | function notAtEnd(cm, pos) {
function makeItWrapAfter (line 2463) | function makeItWrapAfter(cm, pos) {
function countIf (line 2471) | function countIf(arr, f) {
function testMoveBidi (line 2477) | function testMoveBidi(str) {
function testMoveEndBidi (line 2536) | function testMoveEndBidi(str) {
function testCoordsWrappedBidi (line 2596) | function testCoordsWrappedBidi(str) {
Condensed preview — 581 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,005K chars).
[
{
"path": ".editorconfig",
"chars": 87,
"preview": "root = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ncharset = utf-8\n"
},
{
"path": ".gitattributes",
"chars": 160,
"preview": "*.txt text eol=lf\n*.js text eol=lf\n*.html text eol=lf\n*.md text eol=lf\n*.json text eol=lf\n*.yml text eol=lf\n"
},
{
"path": ".github/FUNDING.yml",
"chars": 127,
"preview": "patreon: marijn\ncustom: ['https://www.paypal.com/paypalme/marijnhaverbeke', 'https://marijnhaverbeke.nl/fund/']\ngithub: "
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 443,
"preview": "<!--\nDo not use this bug tracker for questions. We have a forum (https://discuss.codemirror.net) for those.\n\nIn order to"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 447,
"preview": "<!--\nNOTE: We are not accepting pull requests for new modes or addons. Please put such code in a separate repository, an"
},
{
"path": ".github/workflows/ci.yml",
"chars": 410,
"preview": "name: main\non: [push, pull_request]\njobs:\n build-and-test:\n runs-on: ubuntu-latest\n name: Build and test\n step"
},
{
"path": ".gitignore",
"chars": 204,
"preview": "/node_modules\n/npm-debug.log\n/package-lock.json\n/keymap/vim.js\n/test*.html\n.tern-*\n*~\n*.swp\n.idea\n*.iml\n/lib/codemirror."
},
{
"path": ".npmignore",
"chars": 169,
"preview": "/node_modules\n/demo\n/doc\n/test\n/test*.html\n/index.html\n/mode/*/*test.js\n/mode/*/*.html\n/mode/index.html\n.*\n/bin/authors."
},
{
"path": "AUTHORS",
"chars": 12917,
"preview": "List of CodeMirror contributors. Updated before every release.\n\n4oo4\n4r2r\nAaron Brooks\nAbdelouahab\nAbdussalam Abdurrahma"
},
{
"path": "CHANGELOG.md",
"chars": 117099,
"preview": "## 5.65.21 (2026-02-07)\n\n### Bug fixes\n\nBetter handle configuration objects with a null prototype.\n\n[kotlin mode](https:"
},
{
"path": "CONTRIBUTING.md",
"chars": 4090,
"preview": "# How to contribute\n\n- [Getting help](#getting-help)\n- [Submitting bug reports](#submitting-bug-reports)\n- [Contributing"
},
{
"path": "LICENSE",
"chars": 1113,
"preview": "MIT License\n\nCopyright (C) 2017 by Marijn Haverbeke <marijn@haverbeke.berlin> and others\n\nPermission is hereby granted, "
},
{
"path": "README.md",
"chars": 2001,
"preview": "# CodeMirror 5\n\n**NOTE:** [CodeMirror 6](https://codemirror.net/) exists, and is more mobile-friendly, more accessible, "
},
{
"path": "addon/comment/comment.js",
"chars": 9230,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/comment/continuecomment.js",
"chars": 4849,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/dialog/dialog.css",
"chars": 507,
"preview": ".CodeMirror-dialog {\n position: absolute;\n left: 0; right: 0;\n background: inherit;\n z-index: 15;\n padding: .1em .8"
},
{
"path": "addon/dialog/dialog.js",
"chars": 5252,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/display/autorefresh.js",
"chars": 1546,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/display/fullscreen.css",
"chars": 116,
"preview": ".CodeMirror-fullscreen {\n position: fixed;\n top: 0; left: 0; right: 0; bottom: 0;\n height: auto;\n z-index: 9;\n}\n"
},
{
"path": "addon/display/fullscreen.js",
"chars": 1497,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/display/panel.js",
"chars": 4661,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/display/placeholder.js",
"chars": 2831,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/display/rulers.js",
"chars": 1918,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/edit/closebrackets.js",
"chars": 7123,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/edit/closetag.js",
"chars": 8544,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/edit/continuelist.js",
"chars": 3989,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/edit/matchbrackets.js",
"chars": 6815,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/edit/matchtags.js",
"chars": 2358,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/edit/trailingspace.js",
"chars": 1006,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/fold/brace-fold.js",
"chars": 4475,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/fold/comment-fold.js",
"chars": 2164,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/fold/foldcode.js",
"chars": 4985,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/fold/foldgutter.css",
"chars": 435,
"preview": ".CodeMirror-foldmarker {\n color: blue;\n text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1p"
},
{
"path": "addon/fold/foldgutter.js",
"chars": 5539,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/fold/indent-fold.js",
"chars": 1676,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/fold/markdown-fold.js",
"chars": 1608,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/fold/xml-fold.js",
"chars": 6702,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/hint/anyword-hint.js",
"chars": 1683,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/hint/css-hint.js",
"chars": 2580,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/hint/html-hint.js",
"chars": 11458,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/hint/javascript-hint.js",
"chars": 6855,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/hint/show-hint.css",
"chars": 649,
"preview": ".CodeMirror-hints {\n position: absolute;\n z-index: 10;\n overflow: hidden;\n list-style: none;\n\n margin: 0;\n padding"
},
{
"path": "addon/hint/show-hint.js",
"chars": 19792,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/hint/sql-hint.js",
"chars": 9595,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/hint/xml-hint.js",
"chars": 5705,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/lint/coffeescript-lint.js",
"chars": 1468,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/lint/css-lint.js",
"chars": 1312,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/lint/html-lint.js",
"chars": 1991,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/lint/javascript-lint.js",
"chars": 2161,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/lint/json-lint.js",
"chars": 1335,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/lint/lint.css",
"chars": 3035,
"preview": "/* The lint marker gutter */\n.CodeMirror-lint-markers {\n width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n background-color:"
},
{
"path": "addon/lint/lint.js",
"chars": 9841,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/lint/yaml-lint.js",
"chars": 1257,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/merge/merge.css",
"chars": 3423,
"preview": ".CodeMirror-merge {\n position: relative;\n border: 1px solid #ddd;\n white-space: pre;\n}\n\n.CodeMirror-merge, .CodeMirro"
},
{
"path": "addon/merge/merge.js",
"chars": 38660,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/mode/loadmode.js",
"chars": 2543,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/mode/multiplex.js",
"chars": 5191,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/mode/multiplex_test.js",
"chars": 1367,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/mode/overlay.js",
"chars": 3243,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/mode/simple.js",
"chars": 8076,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/runmode/colorize.js",
"chars": 1308,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/runmode/runmode.js",
"chars": 2777,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/scroll/annotatescrollbar.js",
"chars": 4630,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/scroll/scrollpastend.js",
"chars": 1584,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/scroll/simplescrollbars.css",
"chars": 1347,
"preview": ".CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div {\n position: absolute;\n background: #cc"
},
{
"path": "addon/scroll/simplescrollbars.js",
"chars": 5465,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/search/jump-to-line.js",
"chars": 2143,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/search/match-highlighter.js",
"chars": 6216,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/search/matchesonscrollbar.css",
"chars": 188,
"preview": ".CodeMirror-search-match {\n background: gold;\n border-top: 1px solid orange;\n border-bottom: 1px solid orange;\n -moz"
},
{
"path": "addon/search/matchesonscrollbar.js",
"chars": 3858,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/search/search.js",
"chars": 11863,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/search/searchcursor.js",
"chars": 12234,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/selection/active-line.js",
"chars": 2509,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/selection/mark-selection.js",
"chars": 3849,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/selection/selection-pointer.js",
"chars": 3295,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/tern/tern.css",
"chars": 1872,
"preview": ".CodeMirror-Tern-completion {\n padding-left: 22px;\n position: relative;\n line-height: 1.5;\n}\n.CodeMirror-Tern-complet"
},
{
"path": "addon/tern/tern.js",
"chars": 26442,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/tern/worker.js",
"chars": 1211,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "addon/wrap/hardwrap.js",
"chars": 6109,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "bin/authors.sh",
"chars": 351,
"preview": "# Combine existing list of authors with everyone known in git, sort, add header.\ntail --lines=+3 AUTHORS > AUTHORS.tmp\ng"
},
{
"path": "bin/lint",
"chars": 71,
"preview": "#!/usr/bin/env node\n\nprocess.exit(require(\"../test/lint\").ok ? 0 : 1);\n"
},
{
"path": "bin/release",
"chars": 1249,
"preview": "#!/usr/bin/env node\n\nvar fs = require(\"fs\"), child = require(\"child_process\");\n\nvar number, bumpOnly;\n\nfor (var i = 2; i"
},
{
"path": "bin/source-highlight",
"chars": 1389,
"preview": "#!/usr/bin/env node\n\n// Simple command-line code highlighting tool. Reads code from stdin,\n// spits html to stdout. For "
},
{
"path": "bin/upload-release.js",
"chars": 1234,
"preview": "\"use strict\"\n\nlet version = process.argv[2]\nlet auth = process.argv[3]\nlet url = require(\"url\")\n\nif (!auth) {\n console."
},
{
"path": "demo/activeline.html",
"chars": 3223,
"preview": "<!doctype html>\n\n<title>CodeMirror: Active Line Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/d"
},
{
"path": "demo/anywordhint.html",
"chars": 2756,
"preview": "<!doctype html>\n\n<title>CodeMirror: Any Word Completion Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\""
},
{
"path": "demo/bidi.html",
"chars": 4241,
"preview": "<!doctype html>\n\n<title>CodeMirror: Bi-directional Text Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\""
},
{
"path": "demo/btree.html",
"chars": 2946,
"preview": "<!doctype html>\n\n<title>CodeMirror: B-Tree visualization</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../"
},
{
"path": "demo/buffers.html",
"chars": 3552,
"preview": "<!doctype html>\n\n<title>CodeMirror: Multiple Buffer & Split View Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=styleshe"
},
{
"path": "demo/changemode.html",
"chars": 1705,
"preview": "<!doctype html>\n\n<title>CodeMirror: Mode-Changing Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc"
},
{
"path": "demo/closebrackets.html",
"chars": 1643,
"preview": "<!doctype html>\n\n<title>CodeMirror: Closebrackets Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc"
},
{
"path": "demo/closetag.html",
"chars": 1381,
"preview": "<!doctype html>\n\n<title>CodeMirror: Close-Tag Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/doc"
},
{
"path": "demo/complete.html",
"chars": 4292,
"preview": "<!doctype html>\n\n<title>CodeMirror: Autocomplete Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/"
},
{
"path": "demo/emacs.html",
"chars": 2493,
"preview": "<!doctype html>\n\n<title>CodeMirror: Emacs bindings demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../do"
},
{
"path": "demo/folding.html",
"chars": 5790,
"preview": "<!doctype html>\n\n<head>\n <title>CodeMirror: Code Folding Demo</title>\n <meta charset=\"utf-8\"/>\n <link rel=stylesheet "
},
{
"path": "demo/fullscreen.html",
"chars": 3460,
"preview": "<!doctype html>\n\n<title>CodeMirror: Full Screen Editing</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../do"
},
{
"path": "demo/hardwrap.html",
"chars": 2560,
"preview": "<!doctype html>\n\n<title>CodeMirror: Hard-wrapping Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc"
},
{
"path": "demo/html5complete.html",
"chars": 1733,
"preview": "<!doctype html>\n\n<head>\n <title>CodeMirror: HTML completion demo</title>\n <meta charset=\"utf-8\"/>\n <link rel=styleshe"
},
{
"path": "demo/indentwrap.html",
"chars": 2567,
"preview": "<!doctype html>\n\n<title>CodeMirror: Indented wrapped line demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href"
},
{
"path": "demo/lint.html",
"chars": 4064,
"preview": "<!doctype html>\n\n<title>CodeMirror: Linter Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/docs.c"
},
{
"path": "demo/loadmode.html",
"chars": 2212,
"preview": "<!doctype html>\n\n<title>CodeMirror: Lazy Mode Loading Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\".."
},
{
"path": "demo/marker.html",
"chars": 1471,
"preview": "<!doctype html>\n\n<title>CodeMirror: Breakpoint Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/do"
},
{
"path": "demo/markselection.html",
"chars": 1864,
"preview": "<!doctype html>\n\n<title>CodeMirror: Selection Marking Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\".."
},
{
"path": "demo/matchhighlighter.html",
"chars": 4827,
"preview": "<!doctype html>\n\n<title>CodeMirror: Match Highlighter Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\".."
},
{
"path": "demo/matchtags.html",
"chars": 1362,
"preview": "<!doctype html>\n\n<title>CodeMirror: Tag Matcher Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/d"
},
{
"path": "demo/merge.html",
"chars": 4185,
"preview": "<!doctype html>\n\n<title>CodeMirror: merge view demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/do"
},
{
"path": "demo/multiplex.html",
"chars": 2152,
"preview": "<!doctype html>\n\n<title>CodeMirror: Multiplexing Parser Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\""
},
{
"path": "demo/mustache.html",
"chars": 2083,
"preview": "<!doctype html>\n\n<title>CodeMirror: Overlay Parser Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../do"
},
{
"path": "demo/panel.html",
"chars": 3469,
"preview": "<!doctype html>\n\n<title>CodeMirror: Panel Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/docs.cs"
},
{
"path": "demo/placeholder.html",
"chars": 1495,
"preview": "<!doctype html>\n\n<title>CodeMirror: Placeholder demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/d"
},
{
"path": "demo/preview.html",
"chars": 2421,
"preview": "<!doctype html>\n\n<title>CodeMirror: HTML5 preview</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/docs"
},
{
"path": "demo/requirejs.html",
"chars": 2287,
"preview": "<!doctype html>\n\n<head>\n <title>CodeMirror: HTML completion demo</title>\n <meta charset=\"utf-8\"/>\n <link rel=styleshe"
},
{
"path": "demo/resize.html",
"chars": 1346,
"preview": "<!doctype html>\n\n<title>CodeMirror: Autoresize Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/do"
},
{
"path": "demo/rulers.html",
"chars": 1392,
"preview": "<!doctype html>\n\n<title>CodeMirror: Ruler Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/docs.cs"
},
{
"path": "demo/runmode-standalone.html",
"chars": 2235,
"preview": "<!doctype html>\n\n<title>CodeMirror: Mode Runner Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/d"
},
{
"path": "demo/runmode.html",
"chars": 2269,
"preview": "<!doctype html>\n\n<title>CodeMirror: Mode Runner Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/d"
},
{
"path": "demo/search.html",
"chars": 4524,
"preview": "<!doctype html>\n\n<title>CodeMirror: Search/Replace Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../do"
},
{
"path": "demo/simplemode.html",
"chars": 8180,
"preview": "<!doctype html>\n\n<title>CodeMirror: Simple Mode Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/d"
},
{
"path": "demo/simplescrollbars.html",
"chars": 5015,
"preview": "<!doctype html>\n\n<title>CodeMirror: Simple Scrollbar Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../"
},
{
"path": "demo/spanaffectswrapping_shim.html",
"chars": 3043,
"preview": "<!doctype html>\n\n<title>CodeMirror: Automatically derive odd wrapping behavior for your browser</title>\n<meta charset=\"u"
},
{
"path": "demo/sublime.html",
"chars": 2830,
"preview": "<!doctype html>\n\n<title>CodeMirror: Sublime Text bindings demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href"
},
{
"path": "demo/tern.html",
"chars": 4534,
"preview": "<!doctype html>\n\n<title>CodeMirror: Tern Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/docs.css"
},
{
"path": "demo/theme.html",
"chars": 7606,
"preview": "<!doctype html>\n\n<title>CodeMirror: Theme Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/docs.cs"
},
{
"path": "demo/trailingspace.html",
"chars": 1555,
"preview": "<!doctype html>\n\n<title>CodeMirror: Trailing Whitespace Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\""
},
{
"path": "demo/variableheight.html",
"chars": 2055,
"preview": "<!doctype html>\n\n<title>CodeMirror: Variable Height Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../d"
},
{
"path": "demo/vim.html",
"chars": 3997,
"preview": "<!doctype html>\n\n<title>CodeMirror: Vim bindings demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/"
},
{
"path": "demo/visibletabs.html",
"chars": 1850,
"preview": "<!doctype html>\n\n<title>CodeMirror: Visible tabs demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc/"
},
{
"path": "demo/widget.html",
"chars": 2945,
"preview": "<!doctype html>\n\n<title>CodeMirror: Inline Widget Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../doc"
},
{
"path": "demo/xmlcomplete.html",
"chars": 3687,
"preview": "<!doctype html>\n\n<title>CodeMirror: XML Autocomplete Demo</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\".."
},
{
"path": "doc/activebookmark.js",
"chars": 1897,
"preview": "// Kludge in HTML5 tag recognition in IE8\ndocument.createElement(\"section\");\ndocument.createElement(\"article\");\n\n(functi"
},
{
"path": "doc/docs.css",
"chars": 3315,
"preview": "@font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n src: local('Source Sans Pro')"
},
{
"path": "doc/internals.html",
"chars": 25743,
"preview": "<!doctype html>\n\n<title>CodeMirror: Internals</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"docs.css\">\n<st"
},
{
"path": "doc/manual.html",
"chars": 216929,
"preview": "<!doctype html>\n\n<title>CodeMirror 5 User Manual</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"docs.css\">\n<"
},
{
"path": "doc/releases.html",
"chars": 163260,
"preview": "<!doctype html>\n\n<title>CodeMirror: Release History</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"docs.css\""
},
{
"path": "doc/reporting.html",
"chars": 2048,
"preview": "<!doctype html>\n\n<title>CodeMirror: Reporting Bugs</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"docs.css\">"
},
{
"path": "doc/upgrade_v2.2.html",
"chars": 3549,
"preview": "<!doctype html>\n\n<title>CodeMirror: Version 2.2 upgrade guide</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href="
},
{
"path": "doc/upgrade_v3.html",
"chars": 8512,
"preview": "<!doctype html>\n\n<title>CodeMirror: Version 3 upgrade guide</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"d"
},
{
"path": "doc/upgrade_v4.html",
"chars": 5460,
"preview": "<!doctype html>\n\n<title>CodeMirror: Version 4 upgrade guide</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"d"
},
{
"path": "index.html",
"chars": 7692,
"preview": "<!doctype html>\n\n<title>CodeMirror 5</title>\n<meta charset=\"utf-8\"/>\n\n<link rel=stylesheet href=\"lib/codemirror.css\">\n<l"
},
{
"path": "keymap/emacs.js",
"chars": 16336,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "keymap/sublime.js",
"chars": 26694,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "lib/codemirror.css",
"chars": 8720,
"preview": "/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace"
},
{
"path": "mode/apl/apl.js",
"chars": 4548,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/apl/index.html",
"chars": 2105,
"preview": "<!doctype html>\n\n<title>CodeMirror: APL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.c"
},
{
"path": "mode/asciiarmor/asciiarmor.js",
"chars": 2449,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/asciiarmor/index.html",
"chars": 1340,
"preview": "<!doctype html>\n\n<title>CodeMirror: ASCII Armor (PGP) mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\".."
},
{
"path": "mode/asn.1/asn.1.js",
"chars": 7738,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/asn.1/index.html",
"chars": 2273,
"preview": "<!doctype html>\n\n<title>CodeMirror: ASN.1 mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/doc"
},
{
"path": "mode/asterisk/asterisk.js",
"chars": 8142,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/asterisk/index.html",
"chars": 4661,
"preview": "<!doctype html>\n\n<title>CodeMirror: Asterisk dialplan mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\".."
},
{
"path": "mode/brainfuck/brainfuck.js",
"chars": 2177,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/brainfuck/index.html",
"chars": 3349,
"preview": "<!doctype html>\n\n<title>CodeMirror: Brainfuck mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/"
},
{
"path": "mode/clike/clike.js",
"chars": 37362,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/clike/index.html",
"chars": 10561,
"preview": "<!doctype html>\n\n<title>CodeMirror: C-like mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/doc"
},
{
"path": "mode/clike/scala.html",
"chars": 28529,
"preview": "<!doctype html>\n\n<title>CodeMirror: Scala mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs"
},
{
"path": "mode/clike/test.js",
"chars": 5612,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/clojure/clojure.js",
"chars": 15410,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/clojure/index.html",
"chars": 2738,
"preview": "<!doctype html>\n\n<title>CodeMirror: Clojure mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/do"
},
{
"path": "mode/clojure/test.js",
"chars": 18935,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/cmake/cmake.js",
"chars": 2603,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/cmake/index.html",
"chars": 4163,
"preview": "<!doctype html>\n\n<title>CodeMirror: CMake mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs"
},
{
"path": "mode/cobol/cobol.js",
"chars": 10325,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/cobol/index.html",
"chars": 8095,
"preview": "<!doctype html>\n\n<title>CodeMirror: COBOL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs"
},
{
"path": "mode/coffeescript/coffeescript.js",
"chars": 10038,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/coffeescript/index.html",
"chars": 22476,
"preview": "<!doctype html>\n\n<title>CodeMirror: CoffeeScript mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../d"
},
{
"path": "mode/commonlisp/commonlisp.js",
"chars": 4597,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/commonlisp/index.html",
"chars": 6702,
"preview": "<!doctype html>\n\n<title>CodeMirror: Common Lisp mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../do"
},
{
"path": "mode/crystal/crystal.js",
"chars": 12865,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/crystal/index.html",
"chars": 2616,
"preview": "<!doctype html>\n\n<title>CodeMirror: Crystal mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/do"
},
{
"path": "mode/css/css.js",
"chars": 40492,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/css/gss.html",
"chars": 2840,
"preview": "<!doctype html>\n\n<title>CodeMirror: Closure Stylesheets (GSS) mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet "
},
{
"path": "mode/css/gss_test.js",
"chars": 463,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/css/index.html",
"chars": 2222,
"preview": "<!doctype html>\n\n<title>CodeMirror: CSS mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.c"
},
{
"path": "mode/css/less.html",
"chars": 4069,
"preview": "<!doctype html>\n\n<title>CodeMirror: LESS mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs."
},
{
"path": "mode/css/less_test.js",
"chars": 1910,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/css/scss.html",
"chars": 2811,
"preview": "<!doctype html>\n\n<title>CodeMirror: SCSS mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs."
},
{
"path": "mode/css/scss_test.js",
"chars": 3182,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/css/test.js",
"chars": 7523,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/cypher/cypher.js",
"chars": 7130,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/cypher/index.html",
"chars": 1976,
"preview": "<!doctype html>\n\n<title>CodeMirror: Cypher Mode for CodeMirror</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href"
},
{
"path": "mode/cypher/test.js",
"chars": 1346,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/d/d.js",
"chars": 7706,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/d/index.html",
"chars": 6343,
"preview": "<!doctype html>\n\n<title>CodeMirror: D mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css"
},
{
"path": "mode/d/test.js",
"chars": 416,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/dart/dart.js",
"chars": 5664,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/dart/index.html",
"chars": 1647,
"preview": "<!doctype html>\n\n<title>CodeMirror: Dart mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs."
},
{
"path": "mode/diff/diff.js",
"chars": 1141,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/diff/index.html",
"chars": 4420,
"preview": "<!doctype html>\n\n<title>CodeMirror: Diff mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs."
},
{
"path": "mode/django/django.js",
"chars": 11794,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/django/index.html",
"chars": 2072,
"preview": "<!doctype html>\n\n<title>CodeMirror: Django template mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../."
},
{
"path": "mode/dockerfile/dockerfile.js",
"chars": 4741,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/dockerfile/index.html",
"chars": 2262,
"preview": "<!doctype html>\n\n<title>CodeMirror: Dockerfile mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc"
},
{
"path": "mode/dockerfile/test.js",
"chars": 5232,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/dtd/dtd.js",
"chars": 4815,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/dtd/index.html",
"chars": 3332,
"preview": "<!doctype html>\n\n<title>CodeMirror: DTD mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.c"
},
{
"path": "mode/dylan/dylan.js",
"chars": 10115,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/dylan/index.html",
"chars": 13027,
"preview": "<!doctype html>\n\n<title>CodeMirror: Dylan mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs"
},
{
"path": "mode/dylan/test.js",
"chars": 2741,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/ebnf/ebnf.js",
"chars": 6072,
"preview": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/"
},
{
"path": "mode/ebnf/index.html",
"chars": 2445,
"preview": "<!doctype html>\n<html>\n <head>\n <title>CodeMirror: EBNF Mode</title>\n <meta charset=\"utf-8\"/>\n <link rel=style"
}
]
// ... and 381 more files (download for full content)
About this extraction
This page contains the full source code of the codemirror/codemirror5 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 581 files (3.6 MB), approximately 973.6k tokens, and a symbol index with 1892 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.