Much of my development involves reviewing and reading code, both formally and informally. You will only write code once, might modify it a few times, but you will read it over and over. I found code reviews are just a formalization of this code reading process. I’ve noticed a few different types of code reviews, …
Tag: code-reading
Daily Code Reading #35 – Redmine exec_macro
In this weeks code readings, I’ve taken a deep dive tour into how Redmine formats it’s “wiki” text. Today I’m going to wrap it up a final look at the wiki macro execution, #exec_macro. Review Remember, here is the example macro I’m using: This is a page that will include Design {{include(Design)}} textilizable 1 text …
Daily Code Reading #34 – Redmine WikiFormatting#execute_macros
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 …
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 …