Skip to content

Commit f5d3d00

Browse files
committed
Export PassthroughInline
1 parent 29a88c9 commit f5d3d00

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎passthrough/passthrough.go‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ func startsWith(b []byte, s string) bool {
2727
return string(b[:len(s)]) == s
2828
}
2929

30-
type passthroughInline struct {
30+
// PassthroughInline is a node representing a inline passthrough.
31+
type PassthroughInline struct {
3132
ast.BaseInline
3233

3334
// The segment of text that this inline passthrough represents.
@@ -37,20 +38,20 @@ type passthroughInline struct {
3738
Delimiters *Delimiters
3839
}
3940

40-
func newPassthroughInline(segment text.Segment, delimiters *Delimiters) *passthroughInline {
41-
return &passthroughInline{
41+
func newPassthroughInline(segment text.Segment, delimiters *Delimiters) *PassthroughInline {
42+
return &PassthroughInline{
4243
Segment: segment,
4344
Delimiters: delimiters,
4445
}
4546
}
4647

4748
// Text implements Node.Text.
48-
func (n *passthroughInline) Text(source []byte) []byte {
49+
func (n *PassthroughInline) Text(source []byte) []byte {
4950
return n.Segment.Value(source)
5051
}
5152

5253
// Dump implements Node.Dump.
53-
func (n *passthroughInline) Dump(source []byte, level int) {
54+
func (n *PassthroughInline) Dump(source []byte, level int) {
5455
indent := strings.Repeat(" ", level)
5556
fmt.Printf("%sPassthroughInline {\n", indent)
5657
indent2 := strings.Repeat(" ", level+1)
@@ -62,7 +63,7 @@ func (n *passthroughInline) Dump(source []byte, level int) {
6263
var KindPassthroughInline = ast.NewNodeKind("PassthroughInline")
6364

6465
// Kind implements Node.Kind.
65-
func (n *passthroughInline) Kind() ast.NodeKind {
66+
func (n *PassthroughInline) Kind() ast.NodeKind {
6667
return KindPassthroughInline
6768
}
6869

@@ -300,7 +301,7 @@ func (p *passthroughInlineTransformer) Transform(
300301
currentParagraph.AppendChild(currentParagraph, currentNode)
301302
currentNode = nextNode
302303
} else if currentNode.Kind() == KindPassthroughInline {
303-
inline := currentNode.(*passthroughInline)
304+
inline := currentNode.(*PassthroughInline)
304305

305306
// Only split into a new block if the delimiters are block delimiters
306307
if !containsDelimiters(p.BlockDelimiters, inline.Delimiters) {

0 commit comments

Comments
 (0)