File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
packages/docs-markdown/src Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export function getAllEffectiveMetadata(docFxFileInfo: DocFxFileInfo): MetadataE
3939 const result = results . find ( r => ! ! r . groups && r . groups . metadata ) ;
4040 if ( result ) {
4141 try {
42- const metadataJson = jsyaml . load ( result . groups . metadata ) ;
42+ const metadataJson = jsyaml . load ( result . groups . metadata , { skipInvalid : true } ) ;
4343 if ( metadataJson ) {
4444 const lines = result . groups . metadata . split ( / \r \n | \n \r | \n | \r / ) ;
4545 for ( const [ key , value ] of Object . entries ( metadataJson ) ) {
Original file line number Diff line number Diff line change @@ -201,7 +201,9 @@ export async function activate(context: ExtensionContext) {
201201 }
202202 }
203203 } ) ;
204- workspace . onDidChangeTextDocument ( e => {
204+
205+ // Refresh when the active file is changed, including closing it.
206+ window . onDidChangeActiveTextEditor ( e => {
205207 metadataTreeProvider . refresh ( ) ;
206208 } ) ;
207209
You can’t perform that action at this time.
0 commit comments