This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>DataTables + yadcf + Google Maps</title> | |
<script type="text/javascript" charset="utf8" src="http://maps.google.com/maps/api/js?libraries=geometry&v=3.22&key={YOUR_API_KEY}"></script> | |
<script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
<script type="text/javascript" charset="utf8" src="http://cdn.datatables.net/1.10.11/js/jquery.dataTables.js"></script> | |
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.11/js/dataTables.bootstrap.min.js"></script> | |
<script type="text/javascript" charset="utf8" src="maplace.min.js"></script> | |
<script type="text/javascript" charset="utf8" src="jquery.dataTables.yadcf.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin, subprocess | |
class TidyXmlLintCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
command = "XMLLINT_INDENT=$'\t' xmllint --format --encode utf-8 -" | |
# help from http://www.sublimetext.com/forum/viewtopic.php?f=2&p=12451 | |
xmlRegion = sublime.Region(0, self.view.size()) | |
p = subprocess.Popen(command, bufsize=-1, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, shell=True) | |
result, err = p.communicate(self.view.substr(self.view.sel()[0]).encode('utf-8')) |