### Home Classes Methods

### In Files

- lib/taskjuggler/RichText/SyntaxRules.rb

### Methods

- #rule_blankLines
- #rule_blockFunction
- #rule_bulletList1
- #rule_bulletList2
- #rule_bulletList3
- #rule_bulletList4
- #rule_functionArguments
- #rule_headlines
- #rule_htmlBlob
- #rule_inlineFunction
- #rule_moreRefToken
- #rule_numberList1
- #rule_numberList2
- #rule_numberList3
- #rule_numberList4
- #rule_paragraph
- #rule_plainText
- #rule_plainTextWithLinks
- #rule_plainTextWithQueries
- #rule_pre
- #rule_refToken
- #rule_richtext
- #rule_section
- #rule_sections
- #rule_space
- #rule_text
- #rule_textWithSpace
- #rule_title1
- #rule_title2
- #rule_title3
- #rule_title4
- #rule_wordWithQueries

### Files

- CHANGELOG
- COPYING
- README.rdoc

### Class/Module Index

Quicksearch

- TaskJuggler
- TaskJuggler::Account
- TaskJuggler::AccountAttribute
- TaskJuggler::AccountCredit
- TaskJuggler::AccountCreditListAttribute
- TaskJuggler::AccountListRE
- TaskJuggler::AccountScenario
- TaskJuggler::AlertLevelDefinition
- TaskJuggler::AlertLevelDefinitions
- TaskJuggler::Allocation
- TaskJuggler::AllocationAttribute
- TaskJuggler::AttributeBase
- TaskJuggler::AttributeDefinition
- TaskJuggler::AttributeOverwrite
- TaskJuggler::BatchProcessor
- TaskJuggler::Booking
- TaskJuggler::BookingListAttribute
- TaskJuggler::BooleanAttribute
- TaskJuggler::CSVFile
- TaskJuggler::CellSettingPattern
- TaskJuggler::CellSettingPatternList
- TaskJuggler::Charge
- TaskJuggler::ChargeListAttribute
- TaskJuggler::ChargeSet
- TaskJuggler::ChargeSetListAttribute
- TaskJuggler::ChartPlotter
- TaskJuggler::ChartPlotterError
- TaskJuggler::CollisionDetector
- TaskJuggler::ColumnListAttribute
- TaskJuggler::ColumnTable
- TaskJuggler::Daemon
- TaskJuggler::DaemonConnector
- TaskJuggler::DaemonConnectorMixin
- TaskJuggler::DataCache
- TaskJuggler::DataCacheEntry
- TaskJuggler::DateAttribute
- TaskJuggler::DefinitionListAttribute
- TaskJuggler::DependencyListAttribute
- TaskJuggler::DurationAttribute
- TaskJuggler::ExportRE
- TaskJuggler::FileList
- TaskJuggler::FileRecord
- TaskJuggler::FixnumAttribute
- TaskJuggler::FlagListAttribute
- TaskJuggler::FloatAttribute
- TaskJuggler::FormatListAttribute
- TaskJuggler::GanttChart
- TaskJuggler::GanttContainer
- TaskJuggler::GanttHeader
- TaskJuggler::GanttHeaderScaleItem
- TaskJuggler::GanttLine
- TaskJuggler::GanttLoadStack
- TaskJuggler::GanttMilestone
- TaskJuggler::GanttRouter
- TaskJuggler::GanttTaskBar
- TaskJuggler::HTMLDocument
- TaskJuggler::HTMLElements
- TaskJuggler::HTMLGraphics
- TaskJuggler::ICalReport
- TaskJuggler::ICalendar
- TaskJuggler::ICalendar::Component
- TaskJuggler::ICalendar::Event
- TaskJuggler::ICalendar::Journal
- TaskJuggler::ICalendar::Person
- TaskJuggler::ICalendar::Todo
- TaskJuggler::Interval
- TaskJuggler::IntervalList
- TaskJuggler::JobInfo
- TaskJuggler::Journal
- TaskJuggler::JournalEntry
- TaskJuggler::JournalEntryList
- TaskJuggler::JournalSortListAttribute
- TaskJuggler::KateSyntax
- TaskJuggler::KeywordArray
- TaskJuggler::KeywordDocumentation
- TaskJuggler::Leave
- TaskJuggler::LeaveAllowance
- TaskJuggler::LeaveAllowanceList
- TaskJuggler::LeaveAllowanceListAttribute
- TaskJuggler::LeaveList
- TaskJuggler::LeaveListAttribute
- TaskJuggler::Limits
- TaskJuggler::Limits::Limit
- TaskJuggler::LimitsAttribute
- TaskJuggler::ListAttributeBase
- TaskJuggler::Log
- TaskJuggler::LogicalAttribute
- TaskJuggler::LogicalExpression
- TaskJuggler::LogicalExpressionAttribute
- TaskJuggler::LogicalExpressionListAttribute
- TaskJuggler::LogicalFlag
- TaskJuggler::LogicalFunction
- TaskJuggler::LogicalOperation
- TaskJuggler::ManagerResponsibilities
- TaskJuggler::ManagerStatusRecord
- TaskJuggler::Message
- TaskJuggler::MessageHandler
- TaskJuggler::MessageHandlerInstance
- TaskJuggler::MspXmlRE
- TaskJuggler::Navigator
- TaskJuggler::NavigatorElement
- TaskJuggler::NikuProject
- TaskJuggler::NikuReport
- TaskJuggler::NikuResource
- TaskJuggler::NodeListAttribute
- TaskJuggler::PTNProxy
- TaskJuggler::Painter
- TaskJuggler::Painter::Circle
- TaskJuggler::Painter::Color
- TaskJuggler::Painter::Element
- TaskJuggler::Painter::Ellipse
- TaskJuggler::Painter::FontMetrics
- TaskJuggler::Painter::FontMetricsData
- TaskJuggler::Painter::Group
- TaskJuggler::Painter::Line
- TaskJuggler::Painter::Points
- TaskJuggler::Painter::PolyLine
- TaskJuggler::Painter::Primitives
- TaskJuggler::Painter::Rect
- TaskJuggler::Painter::SVGSupport
- TaskJuggler::Painter::Text
- TaskJuggler::PlaceHolderCell
- TaskJuggler::ProcessIntercom
- TaskJuggler::ProcessIntercomIface
- TaskJuggler::Project
- TaskJuggler::ProjectBroker
- TaskJuggler::ProjectBrokerIface
- TaskJuggler::ProjectFileParser
- TaskJuggler::ProjectFileScanner
- TaskJuggler::ProjectRecord
- TaskJuggler::ProjectServer
- TaskJuggler::ProjectServerIface
- TaskJuggler::PropertyAttribute
- TaskJuggler::PropertyList
- TaskJuggler::PropertySet
- TaskJuggler::PropertyTreeNode
- TaskJuggler::Query
- TaskJuggler::RTFHandlers
- TaskJuggler::RTFNavigator
- TaskJuggler::RTFQuery
- TaskJuggler::RTFReport
- TaskJuggler::RTFReportLink
- TaskJuggler::RTFWithQuerySupport
- TaskJuggler::RealFormat
- TaskJuggler::RealFormatAttribute
- TaskJuggler::ReferenceAttribute
- TaskJuggler::Report
- TaskJuggler::ReportBase
- TaskJuggler::ReportContext
- TaskJuggler::ReportScenario
- TaskJuggler::ReportServer
- TaskJuggler::ReportServerIface
- TaskJuggler::ReportServerRecord
- TaskJuggler::ReportServlet
- TaskJuggler::ReportTable
- TaskJuggler::ReportTableCell
- TaskJuggler::ReportTableColumn
- TaskJuggler::ReportTableLegend
- TaskJuggler::ReportTableLine
- TaskJuggler::Resource
- TaskJuggler::ResourceListAttribute
- TaskJuggler::ResourceListRE
- TaskJuggler::ResourceScenario
- TaskJuggler::RichText
- TaskJuggler::RichTextAttribute
- TaskJuggler::RichTextDocument
- TaskJuggler::RichTextElement
- TaskJuggler::RichTextFunctionExample
- TaskJuggler::RichTextFunctionHandler
- TaskJuggler::RichTextImage
- TaskJuggler::RichTextIntermediate
- TaskJuggler::RichTextParser
- TaskJuggler::RichTextScanner
- TaskJuggler::RichTextSnip
- TaskJuggler::RichTextSyntaxRules
- TaskJuggler::Scenario
- TaskJuggler::ScenarioData
- TaskJuggler::ScenarioListAttribute
- TaskJuggler::Scoreboard
- TaskJuggler::ScoreboardInterval
- TaskJuggler::SheetHandlerBase
- TaskJuggler::SheetReceiver
- TaskJuggler::SheetSender
- TaskJuggler::Shift
- TaskJuggler::ShiftAssignment
- TaskJuggler::ShiftAssignments
- TaskJuggler::ShiftAssignmentsAttribute
- TaskJuggler::ShiftScenario
- TaskJuggler::SimpleQueryExpander
- TaskJuggler::SortListAttribute
- TaskJuggler::StatusSheetReceiver
- TaskJuggler::StatusSheetReport
- TaskJuggler::StatusSheetSender
- TaskJuggler::StdIoWrapper
- TaskJuggler::StringAttribute
- TaskJuggler::SymbolAttribute
- TaskJuggler::SymbolListAttribute
- TaskJuggler::SyntaxReference
- TaskJuggler::TOCEntry
- TaskJuggler::TSResourceRecord
- TaskJuggler::TSTaskRecord
- TaskJuggler::TableColumnDefinition
- TaskJuggler::TableColumnSorter
- TaskJuggler::TableOfContents
- TaskJuggler::TableReport
- TaskJuggler::TableReportColumn
- TaskJuggler::TagFile
- TaskJuggler::TagFile::TagFileEntry
- TaskJuggler::Task
- TaskJuggler::TaskDepListAttribute
- TaskJuggler::TaskDependency
- TaskJuggler::TaskListAttribute
- TaskJuggler::TaskListRE
- TaskJuggler::TaskScenario
- TaskJuggler::TernarySearchTree
- TaskJuggler::TextFormatter
- TaskJuggler::TextParser
- TaskJuggler::TextParser::Macro
- TaskJuggler::TextParser::MacroTable
- TaskJuggler::TextParser::Pattern
- TaskJuggler::TextParser::Rule
- TaskJuggler::TextParser::Scanner
- TaskJuggler::TextParser::Scanner::BufferStreamHandle
- TaskJuggler::TextParser::Scanner::FileStreamHandle
- TaskJuggler::TextParser::Scanner::MacroStackEntry
- TaskJuggler::TextParser::Scanner::StreamHandle
- TaskJuggler::TextParser::SourceFileInfo
- TaskJuggler::TextParser::StackElement
- TaskJuggler::TextParser::State
- TaskJuggler::TextParser::StateTransition
- TaskJuggler::TextParser::TextParserResultArray
- TaskJuggler::TextParser::TokenDoc
- TaskJuggler::TextReport
- TaskJuggler::TimeInterval
- TaskJuggler::TimeIntervalListAttribute
- TaskJuggler::TimeSheet
- TaskJuggler::TimeSheetReceiver
- TaskJuggler::TimeSheetRecord
- TaskJuggler::TimeSheetReport
- TaskJuggler::TimeSheetSender
- TaskJuggler::TimeSheetSummary
- TaskJuggler::TimeSheets
- TaskJuggler::Tj3
- TaskJuggler::Tj3AppBase
- TaskJuggler::Tj3Client
- TaskJuggler::Tj3Daemon
- TaskJuggler::Tj3Man
- TaskJuggler::Tj3SheetAppBase
- TaskJuggler::Tj3SsReceiver
- TaskJuggler::Tj3SsSender
- TaskJuggler::Tj3TsReceiver
- TaskJuggler::Tj3TsSender
- TaskJuggler::Tj3TsSummary
- TaskJuggler::Tj3WebD
- TaskJuggler::TjException
- TaskJuggler::TjRuntimeError
- TaskJuggler::TjTime
- TaskJuggler::TjpExample
- TaskJuggler::TjpExportRE
- TaskJuggler::TjpSyntaxRules
- TaskJuggler::TraceReport
- TaskJuggler::URLParameter
- TaskJuggler::UserManual
- TaskJuggler::VimSyntax
- TaskJuggler::WebServer
- TaskJuggler::WelcomePage
- TaskJuggler::WorkingHours
- TaskJuggler::WorkingHoursAttribute
- TaskJuggler::XMLBlob
- TaskJuggler::XMLComment
- TaskJuggler::XMLDocument
- TaskJuggler::XMLElement
- TaskJuggler::XMLNamedText
- TaskJuggler::XMLText
- Diff
- Diff::Hunk
- AppConfig
- Diffable
- DiffableString
- Object
- RuntimeConfig
- String

No matching classes.

# TaskJuggler::RichTextSyntaxRules

This modules contains the syntax definition for the RichTextParser. The defined syntax aims to be compatible to the most commonly used markup elements of the MediaWiki system. See en.wikipedia.org/wiki/Wikipedia:Cheatsheet for details.

Linebreaks are treated just like spaces as word separators unless it is followed by another newline or any of the start-of-line special characters. These characters start sequences that mark headlines, bullet items and such. The special meaning only gets activated when used at the start of the line.

The parser traverses the input text and creates a tree of RichTextElement objects. This is the intermediate representation that can be converted to the final output format.

### Public Instance Methods

rule_blankLines() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 408
    def rule_blankLines
      optional
      repeatable
      pattern(%( $LINEBREAK ))
      pattern(%( $SPACE ))
    end

rule_blockFunction() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 415
    def rule_blockFunction
      pattern(%( $BLOCKFUNCSTART $ID !functionArguments $BLOCKFUNCEND ),
              lambda {
        args = {}
        @val[2].each { |arg| args[arg[0]] = arg[1] } if @val[2]
        el = RichTextElement.new(@richTextI, :blockfunc)
        # Data is a 2 element Array with the function name and a Hash for the
        # arguments.
        unless @richTextI.richText.functionHandler(@val[1], true)
          error('bad_block_function',
                "Unsupported block function #{@val[1]}")
        end
        el.data = [@val[1], args ]
        el
      })
    end

rule_bulletList1() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 133
    def rule_bulletList1
      optional
      repeatable
      pattern(%( $BULLET1 !text ), lambda {
        RichTextElement.new(@richTextI, :bulletitem1, @val[1])
      })
      pattern(%( !bulletList2 ), lambda {
        RichTextElement.new(@richTextI, :bulletlist2, @val[0])
      })
    end

rule_bulletList2() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 144
    def rule_bulletList2
      repeatable
      pattern(%( $BULLET2 !text ), lambda {
        RichTextElement.new(@richTextI, :bulletitem2, @val[1])
      })
      pattern(%( !bulletList3 ), lambda {
        RichTextElement.new(@richTextI, :bulletlist3, @val[0])
      })
    end

rule_bulletList3() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 154
    def rule_bulletList3
      repeatable
      pattern(%( $BULLET3 !text ), lambda {
        RichTextElement.new(@richTextI, :bulletitem3, @val[1])
      })
      pattern(%( !bulletList4 ), lambda {
        RichTextElement.new(@richTextI, :bulletlist4, @val[0])
      })
    end

rule_bulletList4() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 164
    def rule_bulletList4
      repeatable
      pattern(%( $BULLET4 !text ), lambda {
        RichTextElement.new(@richTextI, :bulletitem4, @val[1])
      })
    end

rule_functionArguments() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 451
    def rule_functionArguments
      optional
      repeatable
      pattern(%( $ID _= $STRING ), lambda {
        [ @val[0], @val[2] ]
      })
    end

rule_headlines() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 72
    def rule_headlines
      pattern(%( !title1 ), lambda {
        @val[0]
      })
      pattern(%( !title2 ), lambda {
        @val[0]
      })
      pattern(%( !title3 ), lambda {
        @val[0]
      })
      pattern(%( !title4 ), lambda {
        @val[0]
      })
    end

rule_htmlBlob() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 393
    def rule_htmlBlob
      repeatable
      pattern(%( $HTMLBLOB ), lambda {
        @val[0]
      })
    end

rule_inlineFunction() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 432
    def rule_inlineFunction
      pattern(%( $INLINEFUNCSTART $ID !functionArguments $INLINEFUNCEND
                  !space ),
              lambda {
        args = {}
        @val[2].each { |arg| args[arg[0]] = arg[1] } if @val[2]
        el = RichTextElement.new(@richTextI, :inlinefunc)
        # Data is a 2 element Array with the function name and a Hash for the
        # arguments.
        unless @richTextI.richText.functionHandler(@val[1], false)
          error('bad_inline_function',
                "Unsupported inline function #{@val[1]}")
        end
        el.data = [@val[1], args ]
        el.appendSpace = !@val[4].nil?
        el
      })
    end

rule_moreRefToken() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 336
    def rule_moreRefToken
      repeatable
      optional
      pattern(%( _| !refToken ), lambda {
        @val[1].join
      })
    end

rule_numberList1() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 171
    def rule_numberList1
      repeatable
      pattern(%( $NUMBER1 !text !blankLines ), lambda {
        el = RichTextElement.new(@richTextI, :numberitem1, @val[1])
        @numberListCounter[0] += 1
        el.data = @numberListCounter.dup
        el
      })
      pattern(%( !numberList2 ), lambda {
        @numberListCounter[1, 2] = [ 0, 0 ]
        RichTextElement.new(@richTextI, :numberlist2, @val[0])
      })
    end

rule_numberList2() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 185
    def rule_numberList2
      repeatable
      pattern(%( $NUMBER2 !text !blankLines ), lambda {
        el = RichTextElement.new(@richTextI, :numberitem2, @val[1])
        @numberListCounter[1] += 1
        el.data = @numberListCounter.dup
        el
      })
      pattern(%( !numberList3 ), lambda {
        @numberListCounter[2] = 0
        RichTextElement.new(@richTextI, :numberlist3, @val[0])
      })
    end

rule_numberList3() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 199
    def rule_numberList3
      repeatable
      pattern(%( $NUMBER3 !text !blankLines ), lambda {
        el = RichTextElement.new(@richTextI, :numberitem3, @val[1])
        @numberListCounter[2] += 1
        el.data = @numberListCounter.dup
        el
      })
      pattern(%( !numberList4 ), lambda {
        @numberListCounter[3] = 0
        RichTextElement.new(@richTextI, :numberlist4, @val[0])
      })
    end

rule_numberList4() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 213
    def rule_numberList4
      repeatable
      pattern(%( $NUMBER4 !text !blankLines ), lambda {
        el = RichTextElement.new(@richTextI, :numberitem4, @val[1])
        @numberListCounter[3] += 1
        el.data = @numberListCounter.dup
        el
      })
    end

rule_paragraph() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 223
    def rule_paragraph
      pattern(%( !text ), lambda {
        RichTextElement.new(@richTextI, :paragraph, @val[0])
      })
    end

rule_plainText() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 369
    def rule_plainText
      repeatable
      optional
      pattern(%( !htmlBlob !space ), lambda {
        el = RichTextElement.new(@richTextI, :htmlblob, @val[0].join)
        el.appendSpace = !@val[1].nil?
        el
      })
      pattern(%( $WORD !space ), lambda {
        el = RichTextElement.new(@richTextI, :text, @val[0])
        el.appendSpace = !@val[1].nil?
        el
      })
    end

rule_plainTextWithLinks() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 282
    def rule_plainTextWithLinks
      pattern(%( !plainText ), lambda {
        @val[0]
      })
      pattern(%( $REF !refToken !moreRefToken $REFEND !space ), lambda {
        v1 = @val[1].join
        if v1.index(':')
          protocol, locator = v1.split(':')
        else
          protocol = nil
        end
        el = nil
        if protocol == 'File'
          el = RichTextElement.new(@richTextI, :img)
          unless (index = locator.rindex('.'))
            error('rt_file_no_ext', "File name without extension: #{locator}")
          end
          extension = locator[index + 1..-1].downcase
          unless %( jpg gif png svg ).include?(extension)
            error('rt_file_bad_ext', "Unsupported file type: #{extension}")
          end
          el.data = img = RichTextImage.new(locator)
          if @val[2]
            @val[2].each do |token|
              if token[0, 4] == 'alt='
                img.altText = token[4..-1]
              elsif %( top middle bottom baseline sub super text-top
                        text-bottom ).include?(token)
                img.verticalAlign = token
              else
                error('rt_bad_file_option',
                      "Unknown option '#{token}' for file reference " +
                      "#{v1}.")
              end
            end
          end
        else
          val = @val[2] || v1
          el = RichTextElement.new(@richTextI, :ref,
                                   RichTextElement.new(@richTextI, :text, val))
          el.data = v1
          el.appendSpace = !@val[4].nil?
        end
        el
      })
      pattern(%( $HREF !wordWithQueries !space !plainTextWithQueries
                  $HREFEND !space ), lambda {
        el = RichTextElement.new(@richTextI, :href, @val[3] || @val[1])
        el.data = RichTextElement.new(@richTextI, :richtext, @val[1])
        el.appendSpace = !@val[5].nil?
        el
      })
    end

rule_plainTextWithQueries() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 384
    def rule_plainTextWithQueries
      repeatable
      optional
      pattern(%( !wordWithQueries !space ), lambda {
        @val[0][-1].appendSpace = true if @val[1]
        @val[0]
      })
    end

rule_pre() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 87
    def rule_pre
      repeatable
      pattern(%( $PRE ), lambda {
        @val[0]
      })
    end

rule_refToken() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 344
    def rule_refToken
      repeatable
      pattern(%( $WORD ), lambda {
        @val[0]
      })
    end

rule_richtext() click to toggle source

This is the entry node.

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 31
    def rule_richtext
      pattern(%( !sections . ), lambda {
        RichTextElement.new(@richTextI, :richtext, @val[0])
      })
    end

rule_section() click to toggle source

The following syntax elements are all block elements that can span multiple lines.

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 47
    def rule_section
      pattern(%( !headlines ), lambda {
        @val[0]
      })
      pattern(%( $HLINE ), lambda {
        RichTextElement.new(@richTextI, :hline, @val[0])
      })
      pattern(%( !paragraph ), lambda {
        @val[0]
      })
      pattern(%( !pre ), lambda {
        RichTextElement.new(@richTextI, :pre, @val[0].join)
      })
      pattern(%( !bulletList1 ), lambda {
        RichTextElement.new(@richTextI, :bulletlist1, @val[0])
      })
      pattern(%( !numberList1 ), lambda {
        @numberListCounter = [ 0, 0, 0, 0 ]
        RichTextElement.new(@richTextI, :numberlist1, @val[0])
      })
      pattern(%( !blockFunction ), lambda {
        @val[0]
      })
    end

rule_sections() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 37
    def rule_sections
      optional
      repeatable
      pattern(%( !section !blankLines ), lambda {
        @val[0]
      })
    end

rule_space() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 400
    def rule_space
      optional
      repeatable
      pattern(%( $SPACE ), lambda {
        true
      })
    end

rule_text() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 229
    def rule_text
      pattern(%( !textWithSpace ), lambda {
        @val[0].last.appendSpace = false
        @val[0]
      })
    end

rule_textWithSpace() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 236
    def rule_textWithSpace
      repeatable
      pattern(%( !plainTextWithLinks ), lambda {
        @val[0]
      })
      pattern(%( !inlineFunction ), lambda {
        @val[0]
      })
      pattern(%( $ITALIC !space !plainTextWithLinks $ITALIC !space ), lambda {
        el = RichTextElement.new(@richTextI, :italic, @val[2])
        # Since the italic end marker will disappear we need to make sure
        # there was no space before it.
        @val[2].last.appendSpace = false if @val[2].last
        el.appendSpace = !@val[4].nil?
        el
      })
      pattern(%( $BOLD !space !plainTextWithLinks $BOLD !space ), lambda {
        el = RichTextElement.new(@richTextI, :bold, @val[2])
        @val[2].last.appendSpace = false if @val[2].last
        el.appendSpace = !@val[4].nil?
        el
      })
      pattern(%( $CODE !space !plainTextWithLinks $CODE !space ), lambda {
        el = RichTextElement.new(@richTextI, :code, @val[2])
        @val[2].last.appendSpace = false if @val[2].last
        el.appendSpace = !@val[4].nil?
        el
      })
      pattern(%( $BOLDITALIC !space !plainTextWithLinks $BOLDITALIC !space ),
              lambda {
        el = RichTextElement.new(@richTextI,
                            :bold, RichTextElement.new(@richTextI,
                                                       :italic, @val[2]))
        @val[2].last.appendSpace = false if @val[2].last
        el.appendSpace = !@val[4].nil?
        el
      })
      pattern(%( $FCOLSTART !space !plainTextWithLinks $FCOLEND !space ),
              lambda {
        el = RichTextElement.new(@richTextI, :fontCol, @val[2])
        el.data = @val[0]
        el.appendSpace = !@val[4].nil?
        el
      })
    end

rule_title1() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 94
    def rule_title1
      pattern(%( $TITLE1 !space !text $TITLE1END ), lambda {
        el = RichTextElement.new(@richTextI, :title1, @val[2])
        @sectionCounter[0] += 1
        @sectionCounter[1] = @sectionCounter[2] = 0
        el.data = @sectionCounter.dup
        el
      })
    end

rule_title2() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 104
    def rule_title2
      pattern(%( $TITLE2 !space !text $TITLE2END ), lambda {
        el = RichTextElement.new(@richTextI, :title2, @val[2])
        @sectionCounter[1] += 1
        @sectionCounter[2] = 0
        el.data = @sectionCounter.dup
        el
      })
    end

rule_title3() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 114
    def rule_title3
      pattern(%( $TITLE3 !space !text $TITLE3END ), lambda {
        el = RichTextElement.new(@richTextI, :title3, @val[2])
        @sectionCounter[2] += 1
        @sectionCounter[3] = 0
        el.data = @sectionCounter.dup
        el
      })
    end

rule_title4() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 124
    def rule_title4
      pattern(%( $TITLE4 !space !text $TITLE4END ), lambda {
        el = RichTextElement.new(@richTextI, :title4, @val[2])
        @sectionCounter[3] += 1
        el.data = @sectionCounter.dup
        el
      })
    end

rule_wordWithQueries() click to toggle source

    # File lib/taskjuggler/RichText/SyntaxRules.rb, line 351
    def rule_wordWithQueries
      repeatable
      pattern(%( $WORD ), lambda {
        RichTextElement.new(@richTextI, :text, @val[0])
      })
      pattern(%( $QUERY ), lambda {
        # The <-attributeID-> syntax is a shortcut for an embedded query
        # inline function. It can only be used within a ReportTableCell
        # context that provides a property and a scope property.
        el = RichTextElement.new(@richTextI, :inlinefunc)
        # Data is a 2 element Array with the function name and a Hash for the
        # arguments.
        el.data = ['query', { 'attribute' => @val[0] } ]
        el
      })

    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.