File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ MarkX Formatting
4+ . DESCRIPTION
5+ MarkX formatting source
6+ #>
17Write-FormatView - TypeName MarkX - Property Markdown - Wrap
Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Gets Markdown Images
4+ . DESCRIPTION
5+ Gets `<img>` tags found within Markdown after it has been converted to XML
6+ . NOTES
7+ If the Markdown could not be converted to XML, this will return nothing.
8+ #>
19foreach ($aNode in $this.XML | Select-Xml // img) {
210 if ($aNode.Node.src ) {
311 $aNode.Node
Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Gets MarkX input
4+ . DESCRIPTION
5+ Gets the input objects for a MarkX object.
6+ #>
17return $this .' #input'
Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Gets Markdown Links
4+ . DESCRIPTION
5+ Gets anchor links from within Markdown content.
6+ . NOTES
7+ This will return the links nodes after the Markdown is converted to XML.
8+
9+ If XML conversion fails, this will not return any values.
10+
11+ To find hyperlinks within Markdown, use `.FindHyperlink()`
12+ #>
113foreach ($aNode in $this.XML | Select-Xml // a) {
214 if ($aNode.Node.href ) {
315 $aNode.Node
Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Gets Markdown
4+ . DESCRIPTION
5+ Gets the cached Markdown value for any MarkX object.
6+
7+ This should be a markdown representation of the object.
8+ #>
19return $this .' #Markdown'
Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Sets MarkX Input
4+ . DESCRIPTION
5+ Sets the input for a MarkX file or site.
6+
7+ This will attempt to convert the input to Markdown,
8+ and then will `.Sync()` the object.
9+ #>
110param (
11+ # One or more input objects
212[PSObject []]$InputObject
313)
414
15+ # Set the `#Input` property
516$this | Add-Member NoteProperty ' #Input' $InputObject - Force
617
18+ # and then Sync.
719$this.Sync ()
Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Sets Markdown
4+ . DESCRIPTION
5+ Sets the Markdown on an object.
6+ . NOTES
7+ This will change the `.Input` property, which will then `.Sync()` the markdown.
8+ #>
19param (
10+ # Any new or updated markdown content.
211[PSObject []]$Markdown
312)
413
You can’t perform that action at this time.
0 commit comments