diff --git a/src/extensions/samples/InlineImageViewer/InlineImageViewer.html b/src/extensions/samples/InlineImageViewer/InlineImageViewer.html
index b173e3cf641..c6d8f549e1e 100644
--- a/src/extensions/samples/InlineImageViewer/InlineImageViewer.html
+++ b/src/extensions/samples/InlineImageViewer/InlineImageViewer.html
@@ -1,4 +1,4 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/extensions/samples/InlineImageViewer/main.js b/src/extensions/samples/InlineImageViewer/main.js
index 7dfce389375..227dbd30f04 100644
--- a/src/extensions/samples/InlineImageViewer/main.js
+++ b/src/extensions/samples/InlineImageViewer/main.js
@@ -30,6 +30,7 @@ define(function (require, exports, module) {
// Brackets modules
var EditorManager = brackets.getModule("editor/EditorManager"),
+ ExtensionUtils = brackets.getModule("utils/ExtensionUtils"),
ProjectManager = brackets.getModule("project/ProjectManager");
// Local modules
@@ -47,7 +48,7 @@ define(function (require, exports, module) {
// If the pos is at the beginning of a name, token will be the
// preceding whitespace or dot. In that case, try the next pos.
- if (!/\S/.match(token.string) || token.string === ".") {
+ if (!/\S/.test(token.string) || token.string === ".") {
token = hostEditor._codeMirror.getTokenAt({line: pos.line, ch: pos.ch + 1}, true);
}
@@ -130,5 +131,6 @@ define(function (require, exports, module) {
return result.promise();
}
+ ExtensionUtils.loadStyleSheet(module, "style.css");
EditorManager.registerInlineEditProvider(inlineImageViewerProvider);
});
diff --git a/src/extensions/samples/InlineImageViewer/style.css b/src/extensions/samples/InlineImageViewer/style.css
new file mode 100644
index 00000000000..6dff6d02e26
--- /dev/null
+++ b/src/extensions/samples/InlineImageViewer/style.css
@@ -0,0 +1,11 @@
+.inline-image-viewer .filename {
+ text-align: right;
+ padding-right: 1.5em;
+ line-height: 32px;
+}
+
+.inline-image-viewer .image {
+ display: block;
+ margin: 0 auto;
+ opacity: 0;
+}
\ No newline at end of file