Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hunk.BlockTag should be called InfoString #2

Closed
warpfork opened this issue Aug 28, 2021 · 0 comments
Closed

Hunk.BlockTag should be called InfoString #2

warpfork opened this issue Aug 28, 2021 · 0 comments

Comments

@warpfork
Copy link
Owner

warpfork commented Aug 28, 2021

Apparently, the text after the characters indicating the start of a code block are called the "info string": https://spec.commonmark.org/0.30/#info-string

Currently the go-testmark code called it "BlockTag":

go-testmark/testmark.go

Lines 49 to 51 in 53baa42

// The code block syntax hint (or more literally: anything that comes after the triple-tick that starts the code block).
// Usually we don't encourage use of this much in testmark, but it's here. Can be empty.
BlockTag string

I like my name better, of course (I'm pretty sure someone would know what you mean faster when you say "the code block tag" than "the info string" until you bang them over the head with the spec link), but, ah well. It was a quick choice made without research.

Might as well follow the upstream lexicon as long as there is indeed a clear name specified for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant