diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 7b5bda9fa2..ab8ef932ed 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/eeschema/sch_legacy_plugin.cpp @@ -2472,6 +2472,8 @@ void SCH_LEGACY_PLUGIN_CACHE::loadDocs() break; text = FROM_UTF8( line + 2 ); + // Remove spaces at eol, and eol chars: + text = text.Trim(); switch( line[0] ) { @@ -2490,7 +2492,11 @@ void SCH_LEGACY_PLUGIN_CACHE::loadDocs() alias->SetDocFileName( text ); break; + case 0: + case '\n': + case '\r': case '#': + // Empty line or commment break; default: