📜 ⬆️ ⬇️

Color Converter for Habra

Yesterday published the first article on Habré: http://www.habrahabr.ru/ .

http://atreides07.habrahabr.ru/blog/27693.html


Many thanks for the feedback, tips on Habré and recommendations. Basically there were problems with formatting the source code. Unfortunately, the main problem that has arisen is the color scheme of the source code.
For some reason, the site administration did not introduce more complete support for HTML and the very first problem that arose was HTML formatting .
The reason is that the style attribute is not supported, but the < font color = '...' /> tag is supported .
Perhaps many have already implemented their tools for converting articles for Habra - I also decided to join and laid out a small utility for converting HTML .

For example, if you post the following code in Habré:


    <p style = "color: red">
        Red
    </ p>
    <p style = "color: blue">
        Blue
        <span style = "color: green">
            And green to boot)
        </ span>
    </ p>

So as a result, we get:
Red
Blue
And green to boot)
If you need to bring in just a couple of transformations, then this can be done manually, but if the article uses color schemes reasonably well for clarity, translating all of this manually is quite tiresome.

Especially for the conversion of such a code I posted a small utility at:

http://htmlchangeonhabra.akhmed.ru/
- while very unpretentious - upon receipt of recommendations - I will improve it.

If you enter the above HTML code, we get the code as follows:


<FONT color = red> Red <BR> </ FONT> <FONT color = blue> Blue <FONT color = green> And green in addition) </ FONT> <BR> </ FONT>


Now if we post this received code, we will get the desired result:
Red
Blue and green to boot)     

By the way, with the help of this simple utility, I managed to bring a post to Habré:
http://atreides07.habrahabr.ru/blog/27693.html
to the form to which it originally laid in his blog:
http://akhmed.ru/post/2007/10/LinqAndNTier.aspx .

I will be glad to any recommendations and errors found :)

Utility address:

http : // htmlchangeonhabra. akhmed ru




')

Source: https://habr.com/ru/post/15129/


All Articles