mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Menu: Added a comment about which characters are checked for dividers.
This commit is contained in:
parent
f11de83554
commit
be784b2f79
1
ui/jquery.ui.menu.js
vendored
1
ui/jquery.ui.menu.js
vendored
@ -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" );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user