• Problems with bold and italics markup

    By Timothy J Massey 1 decade ago

    When you start a line with bold, the parser seems to assume it's an bulleted list tag, instead of checking the next character. You get a bullet with the bold text unbolded. When it hits the closing bold tag, it ends the UL and moves the text that comes after it to the next line. Example markup:



    Bold Text Normal text.





    When you start a bulleted line with bold, it is broken in a number of ways. The bullet is on its own line, with the bold text a line below it, unbolded. And then, everything that comes after it is now bolded! Example markup:


    • Bold Text Normal text.





      Nested bold and italics tags remove spaces between the markup. The space between bold and italics text (when bold is first) is removed. Nested italics and bold ignores the opening italics tag. Example markup:



      Normal Bold//Italics// Bold Normal

      Normal//Italics Bold//Italics// Normal



      Here's the HTML output from the above markup:

      Normal//Italics Bold Italics// Normal


      Normal BoldItalics Bold Normal




      For completeness, I thought I'd test overlapping tags. Given the problems above, I expected it to barf, but it actually did somewhat OK. All of the problems from above were there, but I don't think there were any additional failures. Example markup:



      Normal Bold//Italics Italics// Normal

      Normal//Italics Bold// Bold Normal
    • What are you expecting for this

      By Steve Castledine 1 decade ago

      Normal//Italics Bold//Italics// Normal



      I've only coded to open/close when surrounded by//text// - you open twice but close once - so can you explain what a user would expect by doing this?



      Thanks