%section.motion{class: division.motion_edited? ? "motion-edited" : "motion-raw"}
  - if division.motion_edited?
    %p.division-edit-notice.bg-info.col-md-12
      Last edited #{relative_time division.wiki_motion.edit_date}
      by #{link_to division.wiki_motion.user.real_name, division.wiki_motion.user}

  .row
    - if division.motion_edited?
      %nav.header-actions.col-md-3
        = link_to "Edit motion", edit_division_path2(division), title: "Edit and improve this description", class: "btn btn-default btn-xs"

    %h2.col-md-9 Motion

    - if !division.motion_edited?
      %p.division-edit-notice.alert-warning.col-md-12
        %strong Unedited text
        automatically extracted from the debate.
        = link_to "Improve the page providing a summary.", edit_division_path2(division)

  -# The motion can include html.
  -# TODO Need to check what happens when the user edits the motion. What can they add?
  .motion-text
    = division.formatted_motion_text
  %p
    %b= link_to "Debate in Parliament", division.oa_debate_url, title: "Links to debate shown at www.openaustralia.org"
    |
    %b= link_to "Source", division.source_url, title: "The original record of vote as reported by Hansard"

%section.motion{class: division.motion_edited? ? "motion-edited" : "motion-raw"}
  - if division.motion_edited?
    %p.division-edit-notice.bg-info.col-md-12
      Last edited #{relative_time division.wiki_motion.edit_date}
      by #{link_to division.wiki_motion.user.real_name, division.wiki_motion.user}
  .row
    - if division.motion_edited?
      %nav.header-actions.col-md-3
        = link_to "Edit motion", edit_division_path2(division), title: "Edit and improve this description", class: "btn btn-default btn-xs"
    %h2.col-md-9 Motion
    - if !division.motion_edited?
      %p.division-edit-notice.alert-warning.col-md-12
        %strong Unedited text
        automatically extracted from the debate.
        = link_to "Improve the page providing a summary.", edit_division_path2(division)

  -# The motion can include html.
  -# TODO Need to check what happens when the user edits the motion. What can they add?
  .motion-text
    = division.formatted_motion_text
  %p
    %b= link_to "Debate in Parliament", division.oa_debate_url, title: "Links to debate shown at www.openaustralia.org"
    |
    %b= link_to "Source", division.source_url, title: "The original record of vote as reported by Hansard"

Remove newlines to make it clearer what's happening here
Remove newlines to make it clearer what's happening here
