Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
bdc.bdcloud.fr /
includes /
ace /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
snippets
[ DIR ]
drwxr-x---
2025-11-08 11:17
ace.js
703.41
KB
-rwxr-x---
2023-04-04 15:52
ext-beautify.js
12.46
KB
-rwxr-x---
2023-04-04 15:52
ext-code_lens.js
7.66
KB
-rwxr-x---
2023-04-04 15:52
ext-elastic_tabstops_lite.js
8.74
KB
-rwxr-x---
2023-04-04 15:52
ext-emmet.js
47.64
KB
-rwxr-x---
2023-04-04 15:52
ext-error_marker.js
336
B
-rwxr-x---
2023-04-04 15:52
ext-hardwrap.js
4.24
KB
-rwxr-x---
2023-04-04 15:52
ext-keybinding_menu.js
6.09
KB
-rwxr-x---
2023-04-04 15:52
ext-language_tools.js
75.67
KB
-rwxr-x---
2023-04-04 15:52
ext-linking.js
1.95
KB
-rwxr-x---
2023-04-04 15:52
ext-modelist.js
7.35
KB
-rwxr-x---
2023-04-04 15:52
ext-options.js
25.16
KB
-rwxr-x---
2023-04-04 15:52
ext-prompt.js
95.78
KB
-rwxr-x---
2023-04-04 15:52
ext-rtl.js
4.44
KB
-rwxr-x---
2023-04-04 15:52
ext-searchbox.js
16.75
KB
-rwxr-x---
2023-04-04 15:52
ext-settings_menu.js
25.97
KB
-rwxr-x---
2023-04-04 15:52
ext-spellcheck.js
2.46
KB
-rwxr-x---
2023-04-04 15:52
ext-split.js
6.39
KB
-rwxr-x---
2023-04-04 15:52
ext-static_highlight.js
6.87
KB
-rwxr-x---
2023-04-04 15:52
ext-statusbar.js
1.87
KB
-rwxr-x---
2023-04-04 15:52
ext-textarea.js
13.18
KB
-rwxr-x---
2023-04-04 15:52
ext-themelist.js
2.76
KB
-rwxr-x---
2023-04-04 15:52
ext-whitespace.js
6.44
KB
-rwxr-x---
2023-04-04 15:52
keybinding-emacs.js
39.63
KB
-rwxr-x---
2023-04-04 15:52
keybinding-sublime.js
11.12
KB
-rwxr-x---
2023-04-04 15:52
keybinding-vim.js
226.44
KB
-rwxr-x---
2023-04-04 15:52
keybinding-vscode.js
8.06
KB
-rwxr-x---
2023-04-04 15:52
mode-abap.js
9.17
KB
-rwxr-x---
2023-04-04 15:52
mode-abc.js
9.26
KB
-rwxr-x---
2023-04-04 15:52
mode-actionscript.js
24.44
KB
-rwxr-x---
2023-04-04 15:52
mode-ada.js
4.2
KB
-rwxr-x---
2023-04-04 15:52
mode-alda.js
10.23
KB
-rwxr-x---
2023-04-04 15:52
mode-apache_conf.js
18.94
KB
-rwxr-x---
2023-04-04 15:52
mode-apex.js
15.28
KB
-rwxr-x---
2023-04-04 15:52
mode-applescript.js
9.67
KB
-rwxr-x---
2023-04-04 15:52
mode-aql.js
4.6
KB
-rwxr-x---
2023-04-04 15:52
mode-asciidoc.js
13.79
KB
-rwxr-x---
2023-04-04 15:52
mode-asl.js
15.8
KB
-rwxr-x---
2023-04-04 15:52
mode-assembly_x86.js
11.76
KB
-rwxr-x---
2023-04-04 15:52
mode-autohotkey.js
66.03
KB
-rwxr-x---
2023-04-04 15:52
mode-batchfile.js
8.37
KB
-rwxr-x---
2023-04-04 15:52
mode-c9search.js
9.72
KB
-rwxr-x---
2023-04-04 15:52
mode-c_cpp.js
18.93
KB
-rwxr-x---
2023-04-04 15:52
mode-cirru.js
6.15
KB
-rwxr-x---
2023-04-04 15:52
mode-clojure.js
12.82
KB
-rwxr-x---
2023-04-04 15:52
mode-cobol.js
3.6
KB
-rwxr-x---
2023-04-04 15:52
mode-coffee.js
14.39
KB
-rwxr-x---
2023-04-04 15:52
mode-coldfusion.js
102.85
KB
-rwxr-x---
2023-04-04 15:52
mode-crystal.js
23.55
KB
-rwxr-x---
2023-04-04 15:52
mode-csharp.js
16.41
KB
-rwxr-x---
2023-04-04 15:52
mode-csound_document.js
122.34
KB
-rwxr-x---
2023-04-04 15:52
mode-csound_orchestra.js
74.98
KB
-rwxr-x---
2023-04-04 15:52
mode-csound_score.js
14.06
KB
-rwxr-x---
2023-04-04 15:52
mode-csp.js
2.22
KB
-rwxr-x---
2023-04-04 15:52
mode-css.js
31.11
KB
-rwxr-x---
2023-04-04 15:52
mode-curly.js
100.93
KB
-rwxr-x---
2023-04-04 15:52
mode-d.js
17.42
KB
-rwxr-x---
2023-04-04 15:52
mode-dart.js
24.89
KB
-rwxr-x---
2023-04-04 15:52
mode-diff.js
4.69
KB
-rwxr-x---
2023-04-04 15:52
mode-django.js
101.79
KB
-rwxr-x---
2023-04-04 15:52
mode-dockerfile.js
16.16
KB
-rwxr-x---
2023-04-04 15:52
mode-dot.js
13.82
KB
-rwxr-x---
2023-04-04 15:52
mode-drools.js
18.75
KB
-rwxr-x---
2023-04-04 15:52
mode-edifact.js
5.36
KB
-rwxr-x---
2023-04-04 15:52
mode-eiffel.js
5.15
KB
-rwxr-x---
2023-04-04 15:52
mode-ejs.js
138.23
KB
-rwxr-x---
2023-04-04 15:52
mode-elixir.js
23.07
KB
-rwxr-x---
2023-04-04 15:52
mode-elm.js
9.47
KB
-rwxr-x---
2023-04-04 15:52
mode-erlang.js
45.67
KB
-rwxr-x---
2023-04-04 15:52
mode-forth.js
11.3
KB
-rwxr-x---
2023-04-04 15:52
mode-fortran.js
15.04
KB
-rwxr-x---
2023-04-04 15:52
mode-fsharp.js
10.39
KB
-rwxr-x---
2023-04-04 15:52
mode-fsl.js
8.57
KB
-rwxr-x---
2023-04-04 15:52
mode-ftl.js
50.14
KB
-rwxr-x---
2023-04-04 15:52
mode-gcode.js
3.09
KB
-rwxr-x---
2023-04-04 15:52
mode-gherkin.js
4.87
KB
-rwxr-x---
2023-04-04 15:52
mode-gitignore.js
1.77
KB
-rwxr-x---
2023-04-04 15:52
mode-glsl.js
21.98
KB
-rwxr-x---
2023-04-04 15:52
mode-gobstones.js
43.19
KB
-rwxr-x---
2023-04-04 15:52
mode-golang.js
13.82
KB
-rwxr-x---
2023-04-04 15:52
mode-graphqlschema.js
6.76
KB
-rwxr-x---
2023-04-04 15:52
mode-groovy.js
38.08
KB
-rwxr-x---
2023-04-04 15:52
mode-haml.js
76.63
KB
-rwxr-x---
2023-04-04 15:52
mode-handlebars.js
102.49
KB
-rwxr-x---
2023-04-04 15:52
mode-haskell.js
17.1
KB
-rwxr-x---
2023-04-04 15:52
mode-haskell_cabal.js
4.47
KB
-rwxr-x---
2023-04-04 15:52
mode-haxe.js
12.27
KB
-rwxr-x---
2023-04-04 15:52
mode-hjson.js
11.09
KB
-rwxr-x---
2023-04-04 15:52
mode-html.js
99.38
KB
-rwxr-x---
2023-04-04 15:52
mode-html_elixir.js
124.72
KB
-rwxr-x---
2023-04-04 15:52
mode-html_ruby.js
138.97
KB
-rwxr-x---
2023-04-04 15:52
mode-ini.js
4.88
KB
-rwxr-x---
2023-04-04 15:52
mode-io.js
9.09
KB
-rwxr-x---
2023-04-04 15:52
mode-jack.js
11.02
KB
-rwxr-x---
2023-04-04 15:52
mode-jade.js
79.34
KB
-rwxr-x---
2023-04-04 15:52
mode-java.js
39.81
KB
-rwxr-x---
2023-04-04 15:52
mode-javascript.js
31.08
KB
-rwxr-x---
2023-04-04 15:52
mode-json.js
10.33
KB
-rwxr-x---
2023-04-04 15:52
mode-json5.js
11.28
KB
-rwxr-x---
2023-04-04 15:52
mode-jsoniq.js
320.54
KB
-rwxr-x---
2023-04-04 15:52
mode-jsp.js
58.49
KB
-rwxr-x---
2023-04-04 15:52
mode-jssm.js
10.55
KB
-rwxr-x---
2023-04-04 15:52
mode-jsx.js
13.36
KB
-rwxr-x---
2023-04-04 15:52
mode-julia.js
11.93
KB
-rwxr-x---
2023-04-04 15:52
mode-kotlin.js
24.4
KB
-rwxr-x---
2023-04-04 15:52
mode-latex.js
9.49
KB
-rwxr-x---
2023-04-04 15:52
mode-latte.js
106.07
KB
-rwxr-x---
2023-04-04 15:52
mode-less.js
35.21
KB
-rwxr-x---
2023-04-04 15:52
mode-liquid.js
107.9
KB
-rwxr-x---
2023-04-04 15:52
mode-lisp.js
3.47
KB
-rwxr-x---
2023-04-04 15:52
mode-livescript.js
8.34
KB
-rwxr-x---
2023-04-04 15:52
mode-logiql.js
10.65
KB
-rwxr-x---
2023-04-04 15:52
mode-logtalk.js
15.65
KB
-rwxr-x---
2023-04-04 15:52
mode-lsl.js
31.19
KB
-rwxr-x---
2023-04-04 15:52
mode-lua.js
15.03
KB
-rwxr-x---
2023-04-04 15:52
mode-luapage.js
116.01
KB
-rwxr-x---
2023-04-04 15:52
mode-lucene.js
4.78
KB
-rwxr-x---
2023-04-04 15:52
mode-makefile.js
13.17
KB
-rwxr-x---
2023-04-04 15:52
mode-markdown.js
121.81
KB
-rwxr-x---
2023-04-04 15:52
mode-mask.js
70.27
KB
-rwxr-x---
2023-04-04 15:52
mode-matlab.js
22.9
KB
-rwxr-x---
2023-04-04 15:52
mode-maze.js
9.21
KB
-rwxr-x---
2023-04-04 15:52
mode-mediawiki.js
18.96
KB
-rwxr-x---
2023-04-04 15:52
mode-mel.js
28.47
KB
-rwxr-x---
2023-04-04 15:52
mode-mips.js
9.23
KB
-rwxr-x---
2023-04-04 15:52
mode-mixal.js
5.15
KB
-rwxr-x---
2023-04-04 15:52
mode-mushcode.js
12.08
KB
-rwxr-x---
2023-04-04 15:52
mode-mysql.js
8.79
KB
-rwxr-x---
2023-04-04 15:52
mode-nginx.js
20.03
KB
-rwxr-x---
2023-04-04 15:52
mode-nim.js
12.13
KB
-rwxr-x---
2023-04-04 15:52
mode-nix.js
23.65
KB
-rwxr-x---
2023-04-04 15:52
mode-nsis.js
14.82
KB
-rwxr-x---
2023-04-04 15:52
mode-nunjucks.js
105.3
KB
-rwxr-x---
2023-04-04 15:52
mode-objectivec.js
64.32
KB
-rwxr-x---
2023-04-04 15:52
mode-ocaml.js
21.26
KB
-rwxr-x---
2023-04-04 15:52
mode-pascal.js
7.92
KB
-rwxr-x---
2023-04-04 15:52
mode-perl.js
13.09
KB
-rwxr-x---
2023-04-04 15:52
mode-pgsql.js
84.99
KB
-rwxr-x---
2023-04-04 15:52
mode-php.js
583.22
KB
-rwxr-x---
2023-04-04 15:52
mode-php_laravel_blade.js
590.41
KB
-rwxr-x---
2023-04-04 15:52
mode-pig.js
10.91
KB
-rwxr-x---
2023-04-04 15:52
mode-plain_text.js
1.06
KB
-rwxr-x---
2023-04-04 15:52
mode-powershell.js
38.23
KB
-rwxr-x---
2023-04-04 15:52
mode-praat.js
17.59
KB
-rwxr-x---
2023-04-04 15:52
mode-prisma.js
15.26
KB
-rwxr-x---
2023-04-04 15:52
mode-prolog.js
14.07
KB
-rwxr-x---
2023-04-04 15:52
mode-properties.js
2.33
KB
-rwxr-x---
2023-04-04 15:52
mode-protobuf.js
22.1
KB
-rwxr-x---
2023-04-04 15:52
mode-puppet.js
12.74
KB
-rwxr-x---
2023-04-04 15:52
mode-python.js
15.17
KB
-rwxr-x---
2023-04-04 15:52
mode-qml.js
23.1
KB
-rwxr-x---
2023-04-04 15:52
mode-r.js
9.96
KB
-rwxr-x---
2023-04-04 15:52
mode-raku.js
24.53
KB
-rwxr-x---
2023-04-04 15:52
mode-razor.js
111.58
KB
-rwxr-x---
2023-04-04 15:52
mode-rdoc.js
8.06
KB
-rwxr-x---
2023-04-04 15:52
mode-red.js
19.83
KB
-rwxr-x---
2023-04-04 15:52
mode-redshift.js
13.99
KB
-rwxr-x---
2023-04-04 15:52
mode-rhtml.js
108.67
KB
-rwxr-x---
2023-04-04 15:52
mode-rst.js
5.87
KB
-rwxr-x---
2023-04-04 15:52
mode-ruby.js
38.39
KB
-rwxr-x---
2023-04-04 15:52
mode-rust.js
11.19
KB
-rwxr-x---
2023-04-04 15:52
mode-sass.js
23.81
KB
-rwxr-x---
2023-04-04 15:52
mode-scad.js
12.89
KB
-rwxr-x---
2023-04-04 15:52
mode-scala.js
38.18
KB
-rwxr-x---
2023-04-04 15:52
mode-scheme.js
7.14
KB
-rwxr-x---
2023-04-04 15:52
mode-scrypt.js
13.17
KB
-rwxr-x---
2023-04-04 15:52
mode-scss.js
36.93
KB
-rwxr-x---
2023-04-04 15:52
mode-sh.js
14.53
KB
-rwxr-x---
2023-04-04 15:52
mode-sjs.js
37.03
KB
-rwxr-x---
2023-04-04 15:52
mode-slim.js
197.55
KB
-rwxr-x---
2023-04-04 15:52
mode-smarty.js
104.34
KB
-rwxr-x---
2023-04-04 15:52
mode-smithy.js
15.75
KB
-rwxr-x---
2023-04-04 15:52
mode-snippets.js
7.09
KB
-rwxr-x---
2023-04-04 15:52
mode-soy_template.js
112.64
KB
-rwxr-x---
2023-04-04 15:52
mode-space.js
4.99
KB
-rwxr-x---
2023-04-04 15:52
mode-sparql.js
12.35
KB
-rwxr-x---
2023-04-04 15:52
mode-sql.js
8.45
KB
-rwxr-x---
2023-04-04 15:52
mode-sqlserver.js
23.13
KB
-rwxr-x---
2023-04-04 15:52
mode-stylus.js
20.92
KB
-rwxr-x---
2023-04-04 15:52
mode-svg.js
57.64
KB
-rwxr-x---
2023-04-04 15:52
mode-swift.js
13.46
KB
-rwxr-x---
2023-04-04 15:52
mode-tcl.js
12.28
KB
-rwxr-x---
2023-04-04 15:52
mode-terraform.js
12.99
KB
-rwxr-x---
2023-04-04 15:52
mode-tex.js
5.17
KB
-rwxr-x---
2023-04-04 15:52
mode-text.js
329
B
-rwxr-x---
2023-04-04 15:52
mode-textile.js
4.23
KB
-rwxr-x---
2023-04-04 15:52
mode-toml.js
4.17
KB
-rwxr-x---
2023-04-04 15:52
mode-tsx.js
34.14
KB
-rwxr-x---
2023-04-04 15:52
mode-turtle.js
9.31
KB
-rwxr-x---
2023-04-04 15:52
mode-twig.js
105.04
KB
-rwxr-x---
2023-04-04 15:52
mode-typescript.js
33.72
KB
-rwxr-x---
2023-04-04 15:52
mode-vala.js
27.13
KB
-rwxr-x---
2023-04-04 15:52
mode-vbscript.js
24.06
KB
-rwxr-x---
2023-04-04 15:52
mode-velocity.js
108.55
KB
-rwxr-x---
2023-04-04 15:52
mode-verilog.js
4.45
KB
-rwxr-x---
2023-04-04 15:52
mode-vhdl.js
3.96
KB
-rwxr-x---
2023-04-04 15:52
mode-visualforce.js
103.61
KB
-rwxr-x---
2023-04-04 15:52
mode-wollok.js
35
KB
-rwxr-x---
2023-04-04 15:52
mode-xml.js
23.42
KB
-rwxr-x---
2023-04-04 15:52
mode-xquery.js
317.81
KB
-rwxr-x---
2023-04-04 15:52
mode-yaml.js
10.35
KB
-rwxr-x---
2023-04-04 15:52
mode-zeek.js
16.65
KB
-rwxr-x---
2023-04-04 15:52
theme-ambiance.js
27.55
KB
-rwxr-x---
2023-04-04 15:52
theme-chaos.js
3.47
KB
-rwxr-x---
2023-04-04 15:52
theme-chrome.js
3.29
KB
-rwxr-x---
2023-04-04 15:52
theme-clouds.js
2.61
KB
-rwxr-x---
2023-04-04 15:52
theme-clouds_midnight.js
2.96
KB
-rwxr-x---
2023-04-04 15:52
theme-cobalt.js
2.91
KB
-rwxr-x---
2023-04-04 15:52
theme-crimson_editor.js
3.38
KB
-rwxr-x---
2023-04-04 15:52
theme-dawn.js
2.79
KB
-rwxr-x---
2023-04-04 15:52
theme-dracula.js
3.17
KB
-rwxr-x---
2023-04-04 15:52
theme-dreamweaver.js
3.74
KB
-rwxr-x---
2023-04-04 15:52
theme-eclipse.js
2.66
KB
-rwxr-x---
2023-04-04 15:52
theme-github.js
2.72
KB
-rwxr-x---
2023-04-04 15:52
theme-gob.js
2.93
KB
-rwxr-x---
2023-04-04 15:52
theme-gruvbox.js
2.18
KB
-rwxr-x---
2023-04-04 15:52
theme-idle_fingers.js
2.78
KB
-rwxr-x---
2023-04-04 15:52
theme-iplastic.js
6.95
KB
-rwxr-x---
2023-04-04 15:52
theme-katzenmilch.js
3.68
KB
-rwxr-x---
2023-04-04 15:52
theme-kr_theme.js
2.83
KB
-rwxr-x---
2023-04-04 15:52
theme-kuroir.js
2.51
KB
-rwxr-x---
2023-04-04 15:52
theme-merbivore.js
2.76
KB
-rwxr-x---
2023-04-04 15:52
theme-merbivore_soft.js
2.97
KB
-rwxr-x---
2023-04-04 15:52
theme-mono_industrial.js
3.33
KB
-rwxr-x---
2023-04-04 15:52
theme-monokai.js
2.91
KB
-rwxr-x---
2023-04-04 15:52
theme-nord_dark.js
2.62
KB
-rwxr-x---
2023-04-04 15:52
theme-one_dark.js
3.28
KB
-rwxr-x---
2023-04-04 15:52
theme-pastel_on_dark.js
3.18
KB
-rwxr-x---
2023-04-04 15:52
theme-solarized_dark.js
2.83
KB
-rwxr-x---
2023-04-04 15:52
theme-solarized_light.js
2.88
KB
-rwxr-x---
2023-04-04 15:52
theme-sqlserver.js
3.49
KB
-rwxr-x---
2023-04-04 15:52
theme-terminal.js
3.46
KB
-rwxr-x---
2023-04-04 15:52
theme-textmate.js
3.2
KB
-rwxr-x---
2023-04-04 15:52
theme-tomorrow.js
3.1
KB
-rwxr-x---
2023-04-04 15:52
theme-tomorrow_night.js
3.36
KB
-rwxr-x---
2023-04-04 15:52
theme-tomorrow_night_blue.js
3.57
KB
-rwxr-x---
2023-04-04 15:52
theme-tomorrow_night_bright.js
4.05
KB
-rwxr-x---
2023-04-04 15:52
theme-tomorrow_night_eighties.js
3.76
KB
-rwxr-x---
2023-04-04 15:52
theme-twilight.js
3.02
KB
-rwxr-x---
2023-04-04 15:52
theme-vibrant_ink.js
2.73
KB
-rwxr-x---
2023-04-04 15:52
theme-xcode.js
2.43
KB
-rwxr-x---
2023-04-04 15:52
worker-base.js
41.99
KB
-rwxr-x---
2023-04-04 15:52
worker-coffee.js
340.98
KB
-rwxr-x---
2023-04-04 15:52
worker-css.js
306.75
KB
-rwxr-x---
2023-04-04 15:52
worker-html.js
308.72
KB
-rwxr-x---
2023-04-04 15:52
worker-javascript.js
704.57
KB
-rwxr-x---
2023-04-04 15:52
worker-json.js
49.55
KB
-rwxr-x---
2023-04-04 15:52
worker-lua.js
101.46
KB
-rwxr-x---
2023-04-04 15:52
worker-php.js
129.92
KB
-rwxr-x---
2023-04-04 15:52
worker-xml.js
88.56
KB
-rwxr-x---
2023-04-04 15:52
worker-xquery.js
3.34
MB
-rwxr-x---
2023-04-04 15:52
Save
Rename
define("ace/ext/beautify",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } exports.singletonTags = ["area", "base", "br", "col", "command", "embed", "hr", "html", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]; exports.blockTags = ["article", "aside", "blockquote", "body", "div", "dl", "fieldset", "footer", "form", "head", "header", "html", "nav", "ol", "p", "script", "section", "style", "table", "tbody", "tfoot", "thead", "ul"]; exports.beautify = function(session) { var iterator = new TokenIterator(session, 0, 0); var token = iterator.getCurrentToken(); var tabString = session.getTabString(); var singletonTags = exports.singletonTags; var blockTags = exports.blockTags; var nextToken; var breakBefore = false; var spaceBefore = false; var spaceAfter = false; var code = ""; var value = ""; var tagName = ""; var depth = 0; var lastDepth = 0; var lastIndent = 0; var indent = 0; var unindent = 0; var roundDepth = 0; var curlyDepth = 0; var row; var curRow = 0; var rowsToAdd = 0; var rowTokens = []; var abort = false; var i; var indentNextLine = false; var inTag = false; var inCSS = false; var inBlock = false; var levels = {0: 0}; var parents = []; var caseBody = false; var trimNext = function() { if (nextToken && nextToken.value && nextToken.type !== 'string.regexp') nextToken.value = nextToken.value.replace(/^\s*/, ""); }; var trimLine = function() { var end = code.length - 1; while (true) { if (end == 0) break; if (code[end] !== " ") break; end = end - 1; } code = code.slice(0, end + 1); }; var trimCode = function() { code = code.trimRight(); breakBefore = false; }; while (token !== null) { curRow = iterator.getCurrentTokenRow(); rowTokens = iterator.$rowTokens; nextToken = iterator.stepForward(); if (typeof token !== "undefined") { value = token.value; unindent = 0; inCSS = (tagName === "style" || session.$modeId === "ace/mode/css"); if (is(token, "tag-open")) { inTag = true; if (nextToken) inBlock = (blockTags.indexOf(nextToken.value) !== -1); if (value === "</") { if (inBlock && !breakBefore && rowsToAdd < 1) rowsToAdd++; if (inCSS) rowsToAdd = 1; unindent = 1; inBlock = false; } } else if (is(token, "tag-close")) { inTag = false; } else if (is(token, "comment.start")) { inBlock = true; } else if (is(token, "comment.end")) { inBlock = false; } if (!inTag && !rowsToAdd && token.type === "paren.rparen" && token.value.substr(0, 1) === "}") { rowsToAdd++; } if (curRow !== row) { rowsToAdd = curRow; if (row) rowsToAdd -= row; } if (rowsToAdd) { trimCode(); for (; rowsToAdd > 0; rowsToAdd--) code += "\n"; breakBefore = true; if (!is(token, "comment") && !token.type.match(/^(comment|string)$/)) value = value.trimLeft(); } if (value) { if (token.type === "keyword" && value.match(/^(if|else|elseif|for|foreach|while|switch)$/)) { parents[depth] = value; trimNext(); spaceAfter = true; if (value.match(/^(else|elseif)$/)) { if (code.match(/\}[\s]*$/)) { trimCode(); spaceBefore = true; } } } else if (token.type === "paren.lparen") { trimNext(); if (value.substr(-1) === "{") { spaceAfter = true; indentNextLine = false; if(!inTag) rowsToAdd = 1; } if (value.substr(0, 1) === "{") { spaceBefore = true; if (code.substr(-1) !== '[' && code.trimRight().substr(-1) === '[') { trimCode(); spaceBefore = false; } else if (code.trimRight().substr(-1) === ')') { trimCode(); } else { trimLine(); } } } else if (token.type === "paren.rparen") { unindent = 1; if (value.substr(0, 1) === "}") { if (parents[depth-1] === 'case') unindent++; if (code.trimRight().substr(-1) === '{') { trimCode(); } else { spaceBefore = true; if (inCSS) rowsToAdd+=2; } } if (value.substr(0, 1) === "]") { if (code.substr(-1) !== '}' && code.trimRight().substr(-1) === '}') { spaceBefore = false; indent++; trimCode(); } } if (value.substr(0, 1) === ")") { if (code.substr(-1) !== '(' && code.trimRight().substr(-1) === '(') { spaceBefore = false; indent++; trimCode(); } } trimLine(); } else if ((token.type === "keyword.operator" || token.type === "keyword") && value.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)) { trimCode(); trimNext(); spaceBefore = true; spaceAfter = true; } else if (token.type === "punctuation.operator" && value === ';') { trimCode(); trimNext(); spaceAfter = true; if (inCSS) rowsToAdd++; } else if (token.type === "punctuation.operator" && value.match(/^(:|,)$/)) { trimCode(); trimNext(); if (value.match(/^(,)$/) && curlyDepth>0 && roundDepth===0) { rowsToAdd++; } else { spaceAfter = true; breakBefore = false; } } else if (token.type === "support.php_tag" && value === "?>" && !breakBefore) { trimCode(); spaceBefore = true; } else if (is(token, "attribute-name") && code.substr(-1).match(/^\s$/)) { spaceBefore = true; } else if (is(token, "attribute-equals")) { trimLine(); trimNext(); } else if (is(token, "tag-close")) { trimLine(); if(value === "/>") spaceBefore = true; } else if (token.type === "keyword" && value.match(/^(case|default)$/)) { if (caseBody) unindent = 1; } if (breakBefore && !(token.type.match(/^(comment)$/) && !value.substr(0, 1).match(/^[/#]$/)) && !(token.type.match(/^(string)$/) && !value.substr(0, 1).match(/^['"@]$/))) { indent = lastIndent; if(depth > lastDepth) { indent++; for (i=depth; i > lastDepth; i--) levels[i] = indent; } else if(depth < lastDepth) indent = levels[depth]; lastDepth = depth; lastIndent = indent; if(unindent) indent -= unindent; if (indentNextLine && !roundDepth) { indent++; indentNextLine = false; } for (i = 0; i < indent; i++) code += tabString; } if (token.type === "keyword" && value.match(/^(case|default)$/)) { if (caseBody === false) { parents[depth] = value; depth++; caseBody = true; } } else if (token.type === "keyword" && value.match(/^(break)$/)) { if(parents[depth-1] && parents[depth-1].match(/^(case|default)$/)) { depth--; caseBody = false; } } if (token.type === "paren.lparen") { roundDepth += (value.match(/\(/g) || []).length; curlyDepth += (value.match(/\{/g) || []).length; depth += value.length; } if (token.type === "keyword" && value.match(/^(if|else|elseif|for|while)$/)) { indentNextLine = true; roundDepth = 0; } else if (!roundDepth && value.trim() && token.type !== "comment") indentNextLine = false; if (token.type === "paren.rparen") { roundDepth -= (value.match(/\)/g) || []).length; curlyDepth -= (value.match(/\}/g) || []).length; for (i = 0; i < value.length; i++) { depth--; if(value.substr(i, 1)==='}' && parents[depth]==='case') { depth--; } } } if (token.type == "text") value = value.replace(/\s+$/, " "); if (spaceBefore && !breakBefore) { trimLine(); if (code.substr(-1) !== "\n") code += " "; } code += value; if (spaceAfter) code += " "; breakBefore = false; spaceBefore = false; spaceAfter = false; if ((is(token, "tag-close") && (inBlock || blockTags.indexOf(tagName) !== -1)) || (is(token, "doctype") && value === ">")) { if (inBlock && nextToken && nextToken.value === "</") rowsToAdd = -1; else rowsToAdd = 1; } if (is(token, "tag-open") && value === "</") { depth--; } else if (is(token, "tag-open") && value === "<" && singletonTags.indexOf(nextToken.value) === -1) { depth++; } else if (is(token, "tag-name")) { tagName = value; } else if (is(token, "tag-close") && value === "/>" && singletonTags.indexOf(tagName) === -1){ depth--; } row = curRow; } } token = nextToken; } code = code.trim(); session.doc.setValue(code); }; exports.commands = [{ name: "beautify", description: "Format selection (Beautify)", exec: function(editor) { exports.beautify(editor.session); }, bindKey: "Ctrl-Shift-B" }]; }); (function() { window.require(["ace/ext/beautify"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })();