Closed (fixed)
Project:
GeSHi Filter for syntax highlighting
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
16 Nov 2007 at 04:54 UTC
Updated:
26 Dec 2007 at 11:34 UTC
Jump to comment: Most recent file
Comments
Comment #1
soxofaan commentedCan you elaborate on why you want to disable Keyword URLs?
Which languages?
Are you thinking about a global option, per language or per snippet?
A workaround is to edit/copy the language definition files (e.g. geshi/php.php) in the GeSHi library and empty the URL parts (search for the "URLS" item).
Comment #2
denislabonkink commentedDisabling Keyword URLs will provide a clean html output and some Keyword URLs provided by GeShi by default are dead.
Well, as for the options, the more flexible the better but let do this incrementally.
How about starting with a global option, then per language and then finally per snippet?
Comment #3
denislabonkink commentedTo those who want a quick workaround to disable completely Keyword URLs, just simply set add_url_to_keyword() function to always return an empty string. This function is located in geshi.php file of the Geshi library.
Here is the code:
function add_url_to_keyword($keyword, $group, $start_or_end) {
return ""; // <- ADD THIS TO COMPLETELY DISABLE KEYWORD URLs.
if (!$this->keyword_links) {
// Keyword links have been disabled
return;
}
Comment #4
soxofaan commentedWhat's unclean about the Keyword URL's?
And that some URLS are dead don't seem a big problem to me, as long as there are enough alive...
I don't think that the more flexible would be "better". If things become too flexible, they can be a burden to manage/maintain.
I think a global option should be enough.
Comment #5
denislabonkink commentedSorry for the repost. Haven't seen the "Reply" link.
Disabling Keyword URLs will provide a clean html output and some Keyword URLs provided by GeShi by default are dead.
Well, as for the options, the more flexible the better but let do this incrementally.
How about starting with a global option, then per language and then finally per snippet?
Comment #6
denislabonkink commentedWhat I mean by clean html output is that if the webmaster doesn't want Keyword URL's, then he/she doesn't want Keyword URL's to fill the webpage.
A global option is fine with me as that is my need. I'm not familiar with Geshi library but if disabling per language and per snippet is allowed without hacking the library, then these options should also be in geshifilter module.
A side note: Aren't comments supposed to nest when using the Reply link?
Comment #7
soxofaan commentedpatch in attachments adds a global option for this.
If you have suggestions about the UI strings, please comment:
I'll commit this patch soon
It can be done without hacking the GeSHi library. But I don't tend to do it, because it seems overkill to me. The use case you described of the webmaster that doesn't want Keyword URLs is language independent.
Also note that most language definitions do not have keyword URLs, so that would make the option useless in these cases, which is not very user friendly.
comments in issue threads don't show up nested, I don't know why
Comment #8
soxofaan commentedfixed: http://drupal.org/cvs?commit=91122
Comment #9
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.