Ticket #783 (closed defect: fixed)
Filename inherited across code blocks in grabcode handler
| Reported by: | NilsLindenberg | Owned by: | DarTar |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.6.6 |
| Component: | formatters | Version: | 1.1.6.5 |
| Severity: | normal | Keywords: | grabcode 1.1.7-ported |
| Cc: | DarTar |
Description (last modified by DarTar) (diff)
As reported on WikkaBugs, there is a problem with the grabcode handler:
in 1.1.6.2 using a code block like this (A)
%%(cpp;;test.cpp)
#include <iostream>
int main() {
std::cout <<"Hello World\n";
return 0;
}
%%
followed by one like this (B)
%% some rubbish %%
when grabbing the second code block the filename is inherited from block A (test.cpp.txt or test.cpp, if corrected) instead of what you would expect (some default name eg codeblock.txt) ""
The problem occurs because the formatter uses the file name from the first example instead of the default one.
Suggested solution:
change:
static $valid_filename = '';
to
$valid_filename = '';
Change History
Note: See
TracTickets for help on using
tickets.