Skip to content

Commit

Permalink
Docset index pages can now scroll to a specific section within the page
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapeli committed May 25, 2018
1 parent de98bb3 commit 091f04a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dash/DHDocset.m
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,13 @@ - (NSString *)indexFilePath
{
indexFile = [indexFile stringByReplacingOccurrencesOfString:@".html" withString:@"1742.html"];
}
NSString *fullPath = [docsetPath stringByAppendingPathComponent:indexFile];
NSString *fullPath = [docsetPath stringByAppendingPathComponent:[indexFile substringToString:@"#"]];
if([fileManager fileExistsAtPathOrInIndex:fullPath])
{
if([indexFile contains:@"#"])
{
fullPath = [fullPath stringByAppendingFormat:@"#%@", [indexFile substringFromString:@"#"]];
}
return fullPath;
}
}
Expand Down

0 comments on commit 091f04a

Please sign in to comment.