예제 #1
0
        private string LinkEvaluator(Match match)
        {
            var linkId = match.Groups[1].Value.ToLowerInvariant();

            Urls[linkId] = Markdown.EncodeAmpsAndAngles(match.Groups[2].Value);

            var width  = match.Groups[6].Value;
            var height = match.Groups[8].Value;
            var align  = match.Groups[10].Value;

            var convert        = match.Groups[12].Value;
            var convertType    = match.Groups[14].Value;
            var convertQuality = match.Groups[16].Value;
            var hexFillColor   = match.Groups[18].Value;

            //Store the refence image attributes
            var imageFormat = new ReferenceAttributes(width, height, convert, convertType, hexFillColor, convertQuality);

            ReferenceAttributes[linkId] = imageFormat;

            if (!String.IsNullOrWhiteSpace(match.Groups[3].Value))
            {
                Titles[linkId] = match.Groups[3].Value.Replace("\"", """);
            }

            ImageAlignment[linkId] = new ImageOptions(width, height, align);

            return("");
        }
예제 #2
0
        private string LinkEvaluator(Match match)
        {
            var linkId = match.Groups[1].Value.ToLowerInvariant();

            Urls[linkId] = Markdown.EncodeAmpsAndAngles(match.Groups[2].Value);

            var width = match.Groups[6].Value;
            var height = match.Groups[8].Value;
            var align = match.Groups[10].Value;

            var convert = match.Groups[12].Value;
            var convertType = match.Groups[14].Value;
            var convertQuality = match.Groups[16].Value;
            var hexFillColor = match.Groups[18].Value;

            //Store the refence image attributes
            var imageFormat = new ReferenceAttributes(width, height, convert, convertType, hexFillColor, convertQuality);
            ReferenceAttributes[linkId] = imageFormat;

            if (!String.IsNullOrWhiteSpace(match.Groups[3].Value))
            {
                Titles[linkId] = match.Groups[3].Value.Replace("\"", """);
            }

            ImageAlignment[linkId] = new ImageOptions(width, height, align);

            return "";
        }