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

new feature - choosing "tags" instead of line number to display code #17

Open
turgutbaumann opened this issue Aug 29, 2018 · 2 comments

Comments

@turgutbaumann
Copy link

Hi,

we tried the git4c plugin and came across one issue. When we try to display code from a single file, we weren't able to use a special tag inside the file, but only the line number. So in the end when the file is altered by a developer and the number of lines of the section we want to display is growing beyond the limit we set in the macro, the line number has to be altered in the macro on the confluence page as well. It would be much easier to use a specially configured tag, so that the line of code can grew inside the tag and will be displayed despite of that fact.

So the idea is something like that:

adding a new "show option" which should be called "tag" to the macro and two new choosable fields like "start tag" and "end tag" where the tags can be defined.

That would be a great feature to the plugin.

@gkopij
Copy link
Contributor

gkopij commented Oct 6, 2018

Hi,
thank you for reporting the issue. Good Idea.
Question: closing and opening tags seem to be something you would force the developer to include. I would add something like a regex as well and an option to render the closing line or not. Imaging you have a method, you want to show. In every programming language a method has a name, but the syntax is different (python has no closing brackets, java has). When you provide the regex including the method name and as closing with a regex of the next method (or syntax for beginning a new method) it would be more flexible and wouldn't force any developer to add something just to include it in git4c macro.
What is your preference?

@turgutbaumann
Copy link
Author

Hi,

in my opion, a regex would be fine too, since we just can use a tag as exact match in regex. So, if regex would be the more smarter way to add the new functionality in a more flexible way, then I appreciate that.

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

2 participants