From ed5db8db7d3d36da18bb03b0104aaaa63afa31bc Mon Sep 17 00:00:00 2001 From: Isman Firmansyah Date: Sun, 17 Nov 2013 20:43:37 +0700 Subject: [PATCH] support asterisk character to create unordered list --- index.html | 2 +- js/grande.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 65c7d92..585ee11 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@

Welcome, this is grande.js

"Make every detail perfect and limit the number of details to perfect." - Jack Dorsey

Style your text to how you think and put the feeling into your words. Just select any text and choose how you want it to look from the menu.

    diff --git a/js/grande.js b/js/grande.js index 22d4587..65bffc3 100644 --- a/js/grande.js +++ b/js/grande.js @@ -369,7 +369,7 @@ textProp = getTextProp(sel.anchorNode); subject = sel.anchorNode[textProp]; - if (subject.match(/^-\s/) && sel.anchorNode.parentNode.nodeName !== "LI") { + if (subject.match(/^[-*]\s/) && sel.anchorNode.parentNode.nodeName !== "LI") { insertedNode = insertListOnSelection(sel, textProp, "ul"); }