From fa287ba1504fbce0f7a3560aeb1bb50acb4ca3e1 Mon Sep 17 00:00:00 2001 From: David Russell Date: Mon, 3 Oct 2016 15:44:50 +0700 Subject: [PATCH] Resolved #11 background-size YAML option handling. --- app/com/gitpitch/models/MarkdownModel.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/com/gitpitch/models/MarkdownModel.java b/app/com/gitpitch/models/MarkdownModel.java index 1865bac..18909fa 100644 --- a/app/com/gitpitch/models/MarkdownModel.java +++ b/app/com/gitpitch/models/MarkdownModel.java @@ -151,9 +151,12 @@ public class MarkdownModel implements Markdown { String imageBgUrl = imageService.extractBgUrl(md, gitRawBase, this); + String bgSize = (yOpts != null) ? + yOpts.fetchImageBgSize(pp) : YAMLOptions.DEFAULT_BG_SIZE; + return new StringBuffer(delimiter(md)) - .append(imageService.buildBackground(pp, imageBgUrl, - yOpts.fetchImageBgSize(pp))) + .append(imageService.buildBackground(pp, + imageBgUrl, bgSize)) .toString(); } else if (gistDelimFound(md)) {