Today I’m digging back into the WikiFormatting to read through #execute_macros. The Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 module Redmine module WikiFormatting class < e "<div class="flash error">Error executing the <strong>#{macro}</strong> macro (#{e})</div>" end || all else all end end end end end …
Tag: rails
Daily Code Reading #33 – Redmine Textile Formatting
After reading the NullFormatter yesterday, I wanted to take a short look at how Redmine’s Textile formatter works. I’m going to try to avoid much of the parsing code as possible, it’s very complex and could use an entire week of code reading itself. The Code 1 2 3 4 5 6 7 8 9 …
Daily Code Reading #32 – Redmine WikiFormatting
Yesterday’s post showed how ApplicationHelper#textilizable used Redmine::WikiFormatting#to_html to convert the text content into HTML. 1 text = Redmine::WikiFormatting.to_html(Setting.text_formatting, text, :object => obj, :attribute => attr) { |macro, args| exec_macro(macro, obj, args) }text = Redmine::WikiFormatting.to_html(Setting.text_formatting, text, :object => obj, :attribute => attr) { |macro, args| exec_macro(macro, obj, args) } Today I’m going to look into the …
Daily Code Reading #31 – Redmine textilizable
This week I will be reading Redmine‘s text formatting code. I’ve worked on Redmine for a few years now but it’s text formatting is still a complex mystery to me. The text formatting code is used whenever a rich text area is used; that lets you enter bold, underline, internal Redmine links, etc. The Code …
Daily Code Reading #30 – Formtastic basic inputs
Today I’ll be finishing up my code reading session of formtastic by looking at how it creates the input fields. The Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 …