Skip to content

Commit

Permalink
support asterisk character to create unordered list
Browse files Browse the repository at this point in the history
  • Loading branch information
iromli committed Nov 17, 2013
1 parent 0f03f98 commit ed5db8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>Welcome, this is grande.js</h1>
<blockquote>"Make every detail perfect and limit the number of details to perfect." - <span class="jack">Jack Dorsey</span></blockquote>
<p>Style your text to how you <b>think</b> and put the <i>feeling</i> into your words. Just select any text and choose how you want it to look from the menu.</p>
<ul>
<li>Create a bulleted list simply by typing "- " and hitting enter</li>
<li>Create a bulleted list simply by typing "- " or "* " and hitting enter</li>
</ul>

<ol>
Expand Down
2 changes: 1 addition & 1 deletion js/grande.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit ed5db8d

Please sign in to comment.