Git Product home page Git Product logo

markdownps's People

Contributors

aaronparker avatar belibug avatar gitter-badger avatar jkr-acp avatar sarafian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

markdownps's Issues

Syntax of Line in New-MDQuote

This is how it currently works

 New-MDQuote -Lines @("Line 1","Line 2")

> Line 1
> 
> Line 2

Why the blank line between Line1 and Line2.

I checked the syntax guide here which doesn't have multiline example.

This is another doc link with multi line and nested quotes. They don't required empty "> " line between lines either.

Restructure the Demo section

It has been suggested to move the render of the Demo.ps1 to an independent file.
Also the new github alerts implemented in GH-28 will not render correctly as part of the quote currently in the readme file.

Add Markdown Github style alerts

Add markdown syntax to add github alerts like this

Note

Useful information that users should know, even when skimming content.

Github docs link

I can work on this and do pull request if you are still accepting pull requests.

Found Security Issue

Hey, would a security bug that I dont want to disclose on public forum. How do I reach you/update you.

Publish new version

  • Create new branch with respected pull request.
  • Modify the version and CHANGELOG.md to align with the new version. Make sure that there is a v1.Next Minor In progress section in the top empty.
  • Merge to master. This trigger the automatic execution of the publish function from AppVeyor.
  • Tag and create a new release by copying the section from the CHANGELOG.md.

Column sizes for New-MDTable

Hello!

We use this great PowerShell module to auto-generate markdown file and commit it to the repository.
But we have faced with issue that column size depend on content of the column. So if the length of one line was changes, all other lines will be realigned too and it will cause noise for the whole table. So table diff will be overcrowded

It would be great to have a parameter like columnsSizes - array of int, where we can hardcode width of columns and they will be used for table

I can contribute with this changes, just want to make sure that this request sounds good to you.

Broken Muliline quotes for New-MDQuote and New-MDAlert

From GH-33 and as part of the implementation from GH-28 the multiline quote is now broken

It was

> Line1
> 
> Line2

and became

> Line1
> Line2

But this is rendered as one line and apparently there must be 2 empty spaces trailing Line1 for it to show correctly.

Line1
Line2

But this is not human readable hence the prefered solution is to add empty lines though the rendering is a bit different

Line1

Line2

Since the New-MDAlert uses the New-MDQuote and the same logic applies, this will fix both. Tests need to be fixed as well.
Don't forget the Showcase and the changelog

Also mention the reason for this in the code based on the following links

Links

"Import-Module MarkdownPS" on version 1.5 produces errors on PowerShell Core

Hello,

Issue

When I install MarkdownPS 1.5 module and try to import it, I get the following error:

Import-Module : The specified wildcard character pattern is not valid: @{HelpUri=; ScriptBlock=
    [CmdletBinding()]
    [OutputType([string])]
    Param (
...

It looks like all functions work as expected after this error but it produces a lot of noise in our logs.

Possible root cause

Version 1.4 works correctly so it looks like issue comes from psd1 file that was changed between 1.4 and 1.5 versions (MarkdownPS.psd1 contains a huge inline export in field FunctionsToExport in version 1.5)

Repro steps

  1. Use macOS with PowerShell Core
  2. Install MarkdownPS
  3. Import-Module MarkdownPS

Thank you for implementation and supporting this great PowerShell module, hope this issue will be resolved.

Full error message

VERBOSE: Loading module from path '/Users/***/.local/share/powershell/Modules/MarkdownPS/1.5/MarkdownPS.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module MarkdownPS.
VERBOSE: Loading module from path '/Users/***/.local/share/powershell/Modules/MarkdownPS/1.5/MarkdownPS.psm1'.
Import-Module : The specified wildcard character pattern is not valid: @{HelpUri=; ScriptBlock=
    [CmdletBinding()]
    [OutputType([string])]
    Param (
        [Parameter(
            Mandatory = $false,
            Position = 0,
            ValueFromPipeline = $true,
            ParameterSetName="Source"
        )]
        [ValidateNotNullOrEmpty()]
        [string]$Source,
        [Parameter(
            Mandatory = $false
        )]
        [ValidateNotNullOrEmpty()]
        [string]$Title=$null,
        [Parameter(
            Mandatory = $false
        )]
        [string]$AltText=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [string]$Subject=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [string]$Status=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [ValidateSet("brightgreen","green","yellowgreen","yellow","orange","red","lightgrey","blue")]
        [string]$Color=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [ValidateSet("plastic","flat","flat-square","social")]
        [string]$Style=$null,
        [Parameter(
            Mandatory = $false
        )]
        [string]$Link=$null
    )
    Begin {
        $output=""
    }
    Process {
        if(-not $Source -and $Color)
        {
            $Subject=$Subject.Replace("-","--").Replace("_","__")
            $Subject=[System.Uri]::EscapeDataString($Subject)
            $Status=$Status.Replace("-","--").Replace("_","__")
            $Status=[System.Uri]::EscapeDataString($Status)
            
            #When running from powershell [System.Uri]::EscapeDataString is not escaping ()
            if(-not $ise)
            {
                $Subject=$Subject.Replace("(","%28").Replace(")","%29")
                $Status=$Status.Replace("(","%28").Replace(")","%29")
            }
            
            $shieldIo="$Subject-$Status-$Color"
            $Source="https://img.shields.io/badge/$shieldIo.svg"
            if($Style)
            {
                $Source+="?style=$Style"
            }
        }
        
        $output+="![$AltText]($Source"
        if($Title)
        {
            $output+=" ""$Title"""
        }
        $output+=")"
        if($Link)
        {
            $output=New-MDLink -Text $output -Link $Link
        }
    }
    End {
        $output
    }
; CmdletBinding=True; DefaultParameterSet=; Definition=
    [CmdletBinding()]
    [OutputType([string])]
    Param (
        [Parameter(
            Mandatory = $false,
            Position = 0,
            ValueFromPipeline = $true,
            ParameterSetName="Source"
        )]
        [ValidateNotNullOrEmpty()]
        [string]$Source,
        [Parameter(
            Mandatory = $false
        )]
        [ValidateNotNullOrEmpty()]
        [string]$Title=$null,
        [Parameter(
            Mandatory = $false
        )]
        [string]$AltText=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [string]$Subject=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [string]$Status=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [ValidateSet("brightgreen","green","yellowgreen","yellow","orange","red","lightgrey","blue")]
        [string]$Color=$null,
        [Parameter(
            Mandatory = $false,
            ParameterSetName="Shields.io"
        )]
        [ValidateSet("plastic","flat","flat-square","social")]
        [string]$Style=$null,
        [Parameter(
            Mandatory = $false
        )]
        [string]$Link=$null
    )
    Begin {
        $output=""
    }
    Process {
        if(-not $Source -and $Color)
        {
            $Subject=$Subject.Replace("-","--").Replace("_","__")
            $Subject=[System.Uri]::EscapeDataString($Subject)
            $Status=$Status.Replace("-","--").Replace("_","__")
            $Status=[System.Uri]::EscapeDataString($Status)
            
            #When running from powershell [System.Uri]::EscapeDataString is not escaping ()
            if(-not $ise)
            {
                $Subject=$Subject.Replace("(","%28").Replace(")","%29")
                $Status=$Status.Replace("(","%28").Replace(")","%29")
            }
            
            $shieldIo="$Subject-$Status-$Color"
            $Source="https://img.shields.io/badge/$shieldIo.svg"
            if($Style)
            {
                $Source+="?style=$Style"
            }
        }
        
        $output+="![$AltText]($Source"
        if($Title)
        {
            $output+=" ""$Title"""
        }
        $output+=")"
        if($Link)
        {
            $output=New-MDLink -Text $output -Link $Link
        }
    }
    End {
        $output
    }
; Options=None; Description=; Verb=New; Noun=MDImage; HelpFile=; OutputType=System.Collections.ObjectModel.ReadOnlyCollection`1[System.Management.Automation.PSTypeName]; CommandType=Function; Source=MarkDownPS; Version=1.4; Visibility=Public; ModuleName=MarkDownPS; Module=MarkDownPS; RemotingCapability=PowerShell; Parameters=System.Collections.Generic.Dictionary`2[System.String,System.Management.Automation.ParameterMetadata]; ParameterSets=System.Collections.ObjectModel.ReadOnlyCollection`1[System.Management.Automation.CommandParameterSetInfo]}
At line:1 char:1
+ Import-Module MarkdownPS -RequiredVersion 1.5 -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Import-Module], WildcardPatternException
+ FullyQualifiedErrorId : RuntimeException,Microsoft.PowerShell.Commands.ImportModuleCommand

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.