Skip to content

Conversation

chrjorgensen
Copy link
Contributor

This PR will fix syntax highlighting in RPGLE and SQL code samples.

Example:

image

(before)

image

(after)

@SanjulaGanepola I removed some '[' characters from your code syntaxes - I assume you wanted to show the parameters as optional, but the character is not part of the syntax and was missing a closing ']' anyway. Let me know if that is okay with you...

Copy link
Member

@SanjulaGanepola SanjulaGanepola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrjorgensen I wasn't aware that I needed to use RPGLE instead of rpgle for the code blocks, so thanks for catching that!

One request, can we drop the **free? Since this is just an API reference, I opted not to include that originally (especially for the Syntax section, but even the Example section as well). These are just snippets of code. I wrote this spec based on the official RPGUnit docs (https://irpgunit.sourceforge.io/help/) which also doesn't opt to do that:

image

I removed some '[' characters from your code syntaxes - I assume you wanted to show the parameters as optional, but the character is not part of the syntax and was missing a closing ']' anyway.

As for this notation, I did this as well since I did think it was important to indicate optional parameters in the Syntax section. The RPGUnit docs also uses this same notation (as seen above). What do you think about adding this back?

@chrjorgensen
Copy link
Contributor Author

@SanjulaGanepola I also only noticed the language block error because of the Astro build complaining and I had a look into why...

The **free is required for the RPG syntax colors to be correct. If not there, it will be considered fixed-format RPG.
How about removing it from the syntax (and include the [ and ] characters) and remove the language code - this will make the syntax be considered text. And keep the samples as is now, in correct syntax colors?

@SanjulaGanepola
Copy link
Member

remove the language code

@chrjorgensen We will definitely still need the RPGLE language code. When I gave this a try (without the **free):
image

Looks like it had the correct syntax highlighting:
image

For the [, I would say either keep it like in the RPGUnit docs (without the ]) as it doesn't break the syntax highlighting or drop them both as you did.

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

Successfully merging this pull request may close these issues.

2 participants