Coder Social home page Coder Social logo

Comments (4)

pmario avatar pmario commented on June 8, 2024 1

For simple inline styles we do have a wikitext syntax. There should be no need for specialized STYLE tag handling.

See: Styles and Classes in WikiText -- The following code should do the trick without the need for a RED-tag

@@color:red; This is red.@@

For more complex styling needs we should use Stylesheets, which do have a lot more possibilities.

from tiddlywiki5.

CodaCodr avatar CodaCodr commented on June 8, 2024

@pmario. Please climb down. I'm not a noob. This is not Talk. This is not a support request. It's not about inline-style, it's not about color:red.

This is a bug report about whitespace handling, like the topic title says. It's a tiny bug, true, but a bug nonetheless.

from tiddlywiki5.

Jermolene avatar Jermolene commented on June 8, 2024

Hi @CodaCodr one could argue whether this is a bug. It is how TW5 has always behaved. The core docs don't mention or recommend using the inline <style> element.

The background is that a single parser component handles HTML elements like <style> and widgets like <$list>. It handles all elements/widgets consistently. The OP is asking that the parser recognise the <style> element and handle it differently by switching the parser mode such that it doesn't recognise wikitext within the element.

One issue with that approach would be that it is actually quite useful to be able to use wikitext to generate style definitions, and we'd lose that ability.

But my deeper concern is that it would introduce an inconsistency into the way that parsing is performed. Granted, HTML parsers behave in that way, but we're not trying to reproduce HTML here; HTML has incredibly complex parsing rules that few people understand, and so the goal for TW5 is to have simpler parsing rules that are easier to understand.

from tiddlywiki5.

CodaCodr avatar CodaCodr commented on June 8, 2024

Thanks @Jermolene

It handles all elements/widgets consistently. [...] it is actually quite useful to be able to use wikitext to generate style definitions, and we'd lose that ability.

Nuff said. Closing...

from tiddlywiki5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.