Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon committed Feb 13, 2018
1 parent 34ee1d7 commit 8e9bbd5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions parser/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ var _ = Describe("Images", func() {
actualContent := "a paragraph\nimage::images/foo.png[]"
expectedDocument := &types.Paragraph{
Lines: []*types.InlineContent{
&types.InlineContent{
{
Elements: []types.InlineElement{
&types.StringElement{Content: "a paragraph"},
},
},
&types.InlineContent{
{
Elements: []types.InlineElement{
&types.StringElement{Content: "image::images/foo.png[]"},
},
Expand All @@ -139,7 +139,7 @@ var _ = Describe("Images", func() {
Elements: []types.DocElement{
&types.Paragraph{
Lines: []*types.InlineContent{
&types.InlineContent{
{
Elements: []types.InlineElement{
&types.StringElement{Content: "a foo image::foo.png[foo image, 600, 400] bar"},
},
Expand All @@ -160,7 +160,7 @@ var _ = Describe("Images", func() {

It("inline image with empty alt", func() {
actualContent := "image:images/foo.png[]"
expectedDocument := &types.InlineContent{
expectedDocument := {
Elements: []types.InlineElement{
&types.InlineImage{
Macro: types.ImageMacro{
Expand All @@ -175,7 +175,7 @@ var _ = Describe("Images", func() {

It("inline image with empty alt and trailing spaces", func() {
actualContent := "image:images/foo.png[] \t\t "
expectedDocument := &types.InlineContent{
expectedDocument := {
Elements: []types.InlineElement{
&types.InlineImage{
Macro: types.ImageMacro{
Expand All @@ -193,7 +193,7 @@ var _ = Describe("Images", func() {

It("inline image surrounded with test", func() {
actualContent := "a foo image:images/foo.png[] bar..."
expectedDocument := &types.InlineContent{
expectedDocument := {
Elements: []types.InlineElement{
&types.StringElement{
Content: "a foo ",
Expand All @@ -214,7 +214,7 @@ var _ = Describe("Images", func() {

It("inline image with alt", func() {
actualContent := "image:images/foo.png[the foo.png image]"
expectedDocument := &types.InlineContent{
expectedDocument := {
Elements: []types.InlineElement{
&types.InlineImage{
Macro: types.ImageMacro{
Expand All @@ -232,12 +232,12 @@ var _ = Describe("Images", func() {
actualContent := "a paragraph\nimage::images/foo.png[]"
expectedDocument := &types.Paragraph{
Lines: []*types.InlineContent{
&types.InlineContent{
{
Elements: []types.InlineElement{
&types.StringElement{Content: "a paragraph"},
},
},
&types.InlineContent{
{
Elements: []types.InlineElement{
&types.StringElement{Content: "image::images/foo.png[]"},
},
Expand Down

0 comments on commit 8e9bbd5

Please sign in to comment.