Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Mar 12, 2024
2 parents 92b30db + 04471d8 commit 790900b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 65,779 deletions.
5 changes: 1 addition & 4 deletions api/data/DocTree.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,7 @@ component accessors=true {

private string function _getParentPagePathFromPagePath( required string pagePath ) {
var parts = arguments.pagePath.listToArray( "/" );

if ( ArrayLen( parts ) ) {
parts.deleteAt( parts.len() );
}
parts.deleteAt( parts.len() );

return "/" & parts.toList( "/" );
}
Expand Down
6 changes: 5 additions & 1 deletion api/rendering/SyntaxHighlighter.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ component {
arguments.language = "cfm";
}

return highlighter.highlight( arguments.code, arguments.language, false );
try {
return highlighter.highlight( arguments.code, arguments.language, false );
} catch( any e ) {
throw( type="docs.syntax.highlight.error", message="Error highlighting code for language [#arguments.language#]: [#arguments.code#]")
}
}

// PRIVATE HELPERS
Expand Down
Loading

0 comments on commit 790900b

Please sign in to comment.