Skip to content

Commit

Permalink
Menu: Added a comment about which characters are checked for dividers.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed May 25, 2012
1 parent f11de83 commit be784b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ui/jquery.ui.menu.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ $.widget( "ui.menu", {
// initialize unlinked menu-items containing spaces and/or dashes only as dividers // initialize unlinked menu-items containing spaces and/or dashes only as dividers
menus.children( ":not(.ui-menu-item)" ).each( function() { menus.children( ":not(.ui-menu-item)" ).each( function() {
var item = $( this ); var item = $( this );
// hypen, em dash, en dash
if ( !/[^\-—–\s]/.test( item.text() ) ) { if ( !/[^\-—–\s]/.test( item.text() ) ) {
item.addClass( "ui-widget-content ui-menu-divider" ); item.addClass( "ui-widget-content ui-menu-divider" );
} }
Expand Down

0 comments on commit be784b2

Please sign in to comment.