diff --git a/eeschema/sch_text_help.md b/eeschema/sch_text_help.md
index 0255663390..c8d4be447e 100644
--- a/eeschema/sch_text_help.md
+++ b/eeschema/sch_text_help.md
@@ -121,4 +121,11 @@
|
MEM.D1, MEM.D2, MEM.LATCH |
+
+
|
+
+
+
+Note that markup has precedence over bus definitions.
+
diff --git a/eeschema/sch_validators.cpp b/eeschema/sch_validators.cpp
index aba7d013f4..6368cc2708 100644
--- a/eeschema/sch_validators.cpp
+++ b/eeschema/sch_validators.cpp
@@ -202,7 +202,8 @@ bool SCH_FIELD_VALIDATOR::Validate( wxWindow* aParent )
}
-wxRegEx SCH_NETNAME_VALIDATOR::m_busGroupRegex( R"([^$]?{)", wxRE_ADVANCED );
+// Match opening curly brace, preceeded by start-of-line or by a character not including $_^~
+wxRegEx SCH_NETNAME_VALIDATOR::m_busGroupRegex( R"((^|[^$_\^~]){)", wxRE_ADVANCED );
wxString SCH_NETNAME_VALIDATOR::IsValid( const wxString& str ) const
@@ -214,11 +215,11 @@ wxString SCH_NETNAME_VALIDATOR::IsValid( const wxString& str ) const
if( ( str.Contains( '[' ) || str.Contains( ']' ) ) &&
!NET_SETTINGS::ParseBusVector( str, nullptr, nullptr ) )
{
- return _( "Signal name contains '[' or ']' but is not a valid vector bus name" );
+ return _( "Signal name contains '[' or ']' but is not a valid vector bus name." );
}
- // Figuring out if the user "meant" to make a bus group is somewhat trickier because angle
- // brackets are also used for variable expansion
+ // Figuring out if the user "meant" to make a bus group is somewhat trickier because curly
+ // braces are also used for formatting and variable expansion
if( m_busGroupRegex.Matches( str ) && str.Contains( '}' ) &&
!NET_SETTINGS::ParseBusGroup( str, nullptr, nullptr ) )