Skip to content

Commit

Permalink
Test for restricted mode text-alignment
Browse files Browse the repository at this point in the history
Makes sure it is properly stripped out, expect when its needed.

Closes #180
  • Loading branch information
gocom committed Nov 15, 2018
1 parent 3503228 commit ad96f48
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions test/fixtures/issue-180.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Text-aligment is stripped in restricted mode, but kept with images and such:
setup:
- setRestricted: true
input: |
p<. Left aligned paragraph.
p>. Right aligned paragraph.
p=. Center aligned paragraph.
p<>. Justified paragraph.
!<1.jpg!
!>1.jpg!
!=1.jpg!
expect: |
<p>Left aligned paragraph.</p>
<p>Right aligned paragraph.</p>
<p>Center aligned paragraph.</p>
<p>Justified paragraph.</p>
<p><img align="left" alt="" src="1.jpg" /></p>
<p><img align="right" alt="" src="1.jpg" /></p>
<p><img align="center" alt="" src="1.jpg" /></p>
Aligment uses classes with HTML5:
setup:
- setRestricted: true
doctype: html5
input: |
p<. Left aligned paragraph.
p>. Right aligned paragraph.
p=. Center aligned paragraph.
p<>. Justified paragraph.
!<1.jpg!
!>1.jpg!
!=1.jpg!
expect: |
<p>Left aligned paragraph.</p>
<p>Right aligned paragraph.</p>
<p>Center aligned paragraph.</p>
<p>Justified paragraph.</p>
<p><img alt="" class="align-left" src="1.jpg" /></p>
<p><img alt="" class="align-right" src="1.jpg" /></p>
<p><img alt="" class="align-center" src="1.jpg" /></p>

0 comments on commit ad96f48

Please sign in to comment.