Using Java:
Background
Markdownis a formatting syntax used by many documents (these instructi...
![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 22.07.2021 19:10, JackMonhen
Using Java:
Background
Markdownis a formatting syntax used by many documents (these instructions, for example!) because of it's plain-text simplicity and it's ability to be translated directly into HTML.
Task
Let's write a simple markdown parser function that will take in a single line of markdown and be translated into the appropriate HTML. To keep it simple, we'll support only one feature of markdown in atx syntax: headers.
Headers are designated by (1-6) hashes followed by a space, followed by text. The number of hashes determines the header level of the HTML output.
Examples
# Header will become Header
## Header will become Header
Header will become Header
Additional Rules
Header content should only come after the initial hashtag(s) plus a space character.
Invalid headers should just be returned as the markdown that was recieved, no translation necessary.
Spaces before and after both the header content and the hashtag(s) should be ignored in the resulting output.
![answer](/tpl/images/cats/otvet.png)
Answers: 2
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 01:40, Serenitybella
When the pc version of the spreadsheet program became available, the ibm pc quickly became the top-selling personal computer?
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 17:50, ImBADatmath8743
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
![image](/tpl/images/cats/informatica.png)
Do you know the correct answer?
Questions in other subjects:
![Konu](/tpl/images/cats/informatica.png)
![Konu](/tpl/images/cats/ekonomika.png)
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 22.04.2020 00:16
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/obshestvoznanie.png)
![Konu](/tpl/images/cats/en.png)
English, 22.04.2020 00:16