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 …
Tag: text-formatting
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 …
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 …