Can not handle filenames with hash sign.
Multi-language source code documentation tool
Brought to you by:
gregvalure
When trying to generate natural docs documentation with Natural Docs 1.4, I have used a file with name:
itgen#attribute_rules.spc (Oracle PL/SQL).
ND correctly generates output, named itgen#attribute_rules-spc.html
However, the URL in the menu links to itgen#attribute_rules-spc.html, which is page 'itgen' with anchor 'attribute_rules-spc.html'
When you replace the hyperlink by:
itgen%23attribute_rules-spc.html
it works fine.
Open [ND Dir]/Modules/NaturalDocs/Menu.pm and search for "if ($keyword eq 'file')". Change this:
if ($keyword eq 'file')
{
my $flags = 0;
if ($value =~ /^(.+)(([^(]+))$/)
{
my ($title, $file) = ($1, $2);
to this:
if ($keyword eq 'file')
{
my $flags = 0;
my ($title, $file);
This allows # characters in File: entries in Menu.txt using the hack I used to allow them in Link: entries. Now open [ND Dir]/Modules/NaturalDocs/Builder/HTMLBase.pm and search for:
$relativeSourceFile =~ tr/ &?(){};/_/;
Change it to:
$relativeSourceFile =~ tr/ &?(){};#/_/;
This adds # to the list of characters that get replaced with underscores in the output file name. Now run Natural Docs with -r to apply the changes everywhere.