On 29 March 2016 at 11:04, Sam Ruby <ru...@intertwingly.net> wrote:
> On Mon, Mar 28, 2016 at 3:16 PM, Sam Ruby <ru...@intertwingly.net> wrote:
>> On Mon, Mar 28, 2016 at 3:10 PM, sebb <seb...@gmail.com> wrote:
>>> Just noticed another syntax complaint:
>>>
>>> _label "Contributor's Name:", for: 'iclaname'
>>
>> Again, that's syntax that has been supported since Ruby 1.9.
>>
>>> The colon after for is flagged as unexpected.
>
> By the way, another workaround might be to use 1.8.7 syntax:
>
>   _label "Contributor's Name:", :for => 'iclaname'
>
>>> The other main complaint is about:
>>>
>>> onClick: -> {@form = ICLA}
>
> An equivalent, and Ruby 1.8.7 compatible, form:
>
>   onClick: lambda {@form = ICLA}

Thanks, that's v. useful to know.

If I can use a better syntax checker (or update the one Eclipse uses)
then it would be unnecessary.
I'm looking into that.

I think there is a valid complaint: unexpected tRPAREN

text = text.replace("^#{spaces}", 'g'), '')

This is at:

https://github.com/apache/whimsy/blob/master/www/test/icla/views/markdown.js.rb#L26

>> And, again, syntax that was introduced in Ruby 1.9
>>
>> It looks like Eclipse is stuck in 1.8.7, which was retired in
>> https://www.ruby-lang.org/en/news/2013/06/30/we-retire-1-8-7/, but
>> still in active use.
>>
>> For those familiar with Python, the transition from Ruby 1.8.x to Ruby
>> 1.9.x mirrors the transition from Python 2 to Python 3 (particularly
>> in terms of Unicode support), just that the Ruby language transition
>> was more backwards compatible, and therefore less traumatic.
>>
>> - Sam Ruby
>>
>>> On 28 March 2016 at 19:54, sebb <seb...@gmail.com> wrote:
>>>> On 28 March 2016 at 19:47, Sam Ruby <ru...@intertwingly.net> wrote:
>>>>> On Mon, Mar 28, 2016 at 2:06 PM, sebb <seb...@gmail.com> wrote:
>>>>>> The class: attribute is frequently used in Wunderbar HTML tags.
>>>>>
>>>>> Indeed.
>>>>>
>>>>>> This causes problems for Ruby syntax checkers.
>>>>>
>>>>> I'd be curious as to which ones, as that would indicate a syntax
>>>>> checker that hasn't been updated since Ruby 1.9 was release in 2007.
>>>>
>>>> I use the one in Eclipse.
>>>>
>>>>>> It would be useful if there was an alias that could be used instead.
>>>>>> Since it appears frequently, it might be nice to allow c:
>>>>>> Alternatively, clazz: would do.
>>>>>
>>>>> First, wunderbar does support an alternative, but only for class names
>>>>> known at compile time: element class and id syntax adopted by markaby,
>>>>> example:
>>>>>
>>>>>   _p.important
>>>>
>>>> Does that work with tag! ?
>>>>
>>>> e.g. would this work?
>>>>
>>>> tag!._stdin
>>>>
>>>>> Second, as HTML is case insensitive, both Class and CLASS should also
>>>>> work.
>>>>
>>>> Using Class: avoids the error, so that would work for me.
>>>>
>>>>>  As I feel that it is important for code to be read as written,
>>>>> I would prefer to avoid things like 'c', or perhaps even 'clazz' as
>>>>> those could be valid attribute names.  If an alternative is required,
>>>>> I would prefer to go with _class.
>>>>>
>>>>> - Sam Ruby

Reply via email to