Hi Gary,

The fix was easy but again a dirty one. I'm looking forward to close the
bug soon. Currently I have used the KeyError exception handling. I hope to
find an alternative solution soon. And I have doubts regarding the license
too. Actually I forked(modified) the mode wikimarkup.js and wikimarkup.css
(still incomplete and a long way to get it perfected) from
https://github.com/marijnh/CodeMirror/blob/master/mode/tiki/. So should I
put the codemirror license in it or the apache license. I'm currently
updating the repo now. Please do check the license in each of the external
files i.e the following:
1. 
bloodhound_livesyntaxhighlighting/bhlivesyntaxhighlight/htdocs/js/codemirror.js
2.
bloodhound_livesyntaxhighlighting/bhlivesyntaxhighlight/htdocs/css/codemirror.css

I haven't coded for the wikitoolbar yet. I was planning to remove it. But I
need your opinion here. And the code folding is implemented now i guess.

Further I would like to know whether are we having syntax highlighting in a
nested manner. Or in other words, if we are writing the code in wikimarkup
processor tags({{{ }}}), is it required to highlight in that language too.
I'm trying for it actually.

And devs please do check out the branch livesyntaxhighlighting and feel
free to put in your suggestions to improve it.

Thanks & Regards,

Anoop Nayak


On Wed, Sep 18, 2013 at 5:59 PM, Gary Martin <[email protected]>wrote:

> Hi Anoop,
>
> It looks like 'action' is not always available in req.args and so I see an
> error on some pages:
>
> ==== Python Traceback ====
> {{{
> Traceback (most recent call last):
>   File 
> "/home/bh/bloodhound/branches/**livesyntaxhighlighting/trac/**trac/web/main.py",
> line 477, in _dispatch_request
>     dispatcher.dispatch(req)
>   File 
> "/home/bh/bloodhound/branches/**livesyntaxhighlighting/trac/**trac/web/main.py",
> line 224, in dispatch
>     self._post_process_request(**req, *resp)
>   File 
> "/home/bh/bloodhound/branches/**livesyntaxhighlighting/trac/**trac/web/main.py",
> line 338, in _post_process_request
>     resp = f.post_process_request(req, *resp)
>   File "/home/bh/bloodhound/branches/**livesyntaxhighlighting/**
> bloodhound_**livesyntaxhighlighting/**bhlivesyntaxhighlight/**bhlivesyntaxhighlight.py",
> line 28, in post_process_request
>     if req.args['action'] == "edit":
> KeyError: 'action'
> }}}
>
> That should be pretty easy to fix :)
>
> Otherwise it is starting to look pretty good already. There are some bits
> of funky behaviour (at least in chrome) with the wikitoolbar appearing
> above the textarea but not having any effect. Also the horizontal scrollbar
> probably shouldn't be there, partly as it seems to interfere with resizing
> but also because lines are expected to wrap as needed outside of edit mode.
>
> Sorry if you are already aware of all this stuff of course.
>
> Cheers,
>     Gary
>
>
>
> On 18/09/13 12:24, Gary Martin wrote:
>
>> Excellent.. I will have a quick look.
>>
>> Before I delve too deep, would you like to add the package to the
>> installer/requirements.txt and installer/requirements-dev.txt in your
>> branch to potentially remove a step to work out how to install your plugin?
>>
>> Also, though it may seem a little pedantic this early, could you add our
>> standard license header to any source files that you have created - that is
>> anything that you have actually written so you should ignore anything from
>> codemirror. We must also not forget to update the NOTICE and LICENSE files
>> with appropriate entries for codemirror's code.
>>
>> Cheers,
>>     Gary
>>
>> On 18/09/13 10:38, Anoop Nayak wrote:
>>
>>> Hi Ryan and all devs,
>>>
>>> The scripts are getting included now in the template. I managed to hook
>>> it
>>> up all working without disturbing the original template. Please do check
>>> it
>>> out. The syntax highlighting is not complete yet but a work in progress.
>>> Will update it soon.
>>>
>>> Thanks & Regards,
>>>
>>> Anoop Nayak
>>>
>>>
>>> On Wed, Sep 18, 2013 at 1:20 PM, Anoop Nayak <[email protected]>
>>> wrote:
>>>
>>>  Thanks. I just missed that out entirely :(.
>>>>
>>>>
>>>> On Wed, Sep 18, 2013 at 1:15 PM, Ryan Ollos <[email protected]>**
>>>> wrote:
>>>>
>>>>  On Wed, Sep 18, 2013 at 12:40 AM, Anoop Nayak <[email protected]>
>>>>> wrote:
>>>>>
>>>>>  Hi Ryan,
>>>>>>
>>>>>> I have been trying to make the plugin for a couple of hours before but
>>>>>>
>>>>> seem
>>>>>
>>>>>> to have come across this error:
>>>>>>
>>>>>> TypeError: pre_process_request() takes exactly 2 arguments (3 given)
>>>>>>
>>>>>> But I have used only 2 arguments in the code i.e as follows
>>>>>> def pre_process_request(req, handler):
>>>>>>          return req, handler
>>>>>>
>>>>>> Could you please help me with this?
>>>>>>
>>>>>> Thanks & Regards,
>>>>>>
>>>>>> Anoop
>>>>>>
>>>>>>  It's a class method, so you need `self` as the first argument:
>>>>> def pre_process_request(self, req, handler):
>>>>>
>>>>>
>>>>
>>>> --
>>>> Anoop
>>>>
>>>>
>>>
>>>
>>
>


-- 
Anoop

Reply via email to