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

doc: Convert HTML to Markdown #1332

Merged
merged 8 commits into from
Feb 20, 2025
Merged

Conversation

wenzeslaus
Copy link
Member

@wenzeslaus wenzeslaus commented Feb 20, 2025

This converts HTML markup in .md files to Markdown using the ./utils/grass_html2md.sh script from core.

In addition to the automatic conversion it:

  • Does basic whitespace cleanup (esp. double whitespace in lists).
  • Removes empty first line for v.area.stats.
  • Uses text code blocks where appropriate for i.sentinel.preproc.
  • Specifies text for r.fuzzy.system code blocks with syntax and explanation examples.

It further adjusts linting to accommodate the auto-converted Markdown.

It does not touch r.landscape.evol because that tool has already had Markdown documentation (which needs to be revised manually as needed).

@wenzeslaus wenzeslaus changed the title convert to md doc: Convert HTML to Markdown Feb 20, 2025
@wenzeslaus
Copy link
Member Author

Running pre-commit run markdownlint-fix -a locally, I get suggestions, but I don't know how to actually fix the code or disable the checks.

The suggestion is to remove $ , but the code is correct, it is the syntax of a language specific to that tool. I though using text as language will make it work, but I still get the wrong suggestion (and thus failure in CI).

--- a/src/raster/r.fuzzy.system/r.fuzzy.system.md
+++ b/src/raster/r.fuzzy.system/r.fuzzy.system.md
@@ -14,7 +14,7 @@
     of rule file. Lines beginning with **\#** are comments.
     
     ```text
-    $ set_name {side; points; boundary_shape; hedge; height }
+    set_name {side; points; boundary_shape; hedge; height }
     ```
     
 
@@ -44,7 +44,7 @@
     An example of fuzzy sets definition:
     
     ```text
-    $ moderate {both; 90,100,120,130; sshaped; 0; 1}
+    moderate {both; 90,100,120,130; sshaped; 0; 1}
     ```
     
 
@@ -79,7 +79,7 @@
     An example of fuzzy rules definition:
     
     ```text
-    $ small {distance = high & elev = high}
+    small {distance = high & elev = high}
     ```

@wenzeslaus
Copy link
Member Author

Fortunately, General linting / GitHub Super Linter workflow clarified for me what are the issues, so I'm ignoring them for now, but unfortunately markdownlint triggers the warning for language set to text. Maybe, we need to use a custom language. (?)

@cwhite911
Copy link
Contributor

unfortunately markdownlint triggers the warning for language set to text. Maybe, we need to use a custom language.

@wenzeslaus Which Rule was trigger this warning?

@cwhite911
Copy link
Contributor

unfortunately markdownlint triggers the warning for language set to text. Maybe, we need to use a custom language.

@wenzeslaus Which Rule was trigger this warning?

Never mind I see it.

@wenzeslaus
Copy link
Member Author

Maybe, we need to use a custom language. (?)

I mean later, in some following PR.

Copy link
Contributor

@cwhite911 cwhite911 left a comment

Choose a reason for hiding this comment

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

From the files I've spot check this looks good to me. The only issues I've found were existing bugs in the origin html, so unrelated to this PR.

@wenzeslaus wenzeslaus merged commit 53de819 into OSGeo:grass8 Feb 20, 2025
7 checks passed
@wenzeslaus wenzeslaus deleted the convert-to-md branch February 20, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants