Code Monkey home page Code Monkey logo

obsidian-fountain-editor's Issues

Skip frontmatter during Fountain parsing

Describe the task

When iterating thorough line-by-line,
if the first line is a triple-hyphen frontmatter opening,
then skip parsing until we hit the next triple-hyphen

Linked Issues

  • BLOCKED BY: #6

Expected behavior

  • When console.logging each line as it processes, the frontmatter lines should be exclued.

Screenshots

Additional context

Token: Character extensions are parsed as dialogue parentheticals

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Environment

  • Plugin Version: 1.10.3
  • Obsidian Version: [e.g. v1.14.3]
  • Device: [e.g. MacOS, Windows, Android, iOS]

Additional context

Settings: Toggle hide whitespace in live margin

Describe the task

Setting, if live margins, to display: none for whitespace characters

Linked Issues

  • RELATED: #num
  • BLOCKED BY: #15
  • BLOCKS: #num

Expected behavior

  • Setting True: While live margins, whitespace is hidden in editor
  • Setting False: While live margins, whitespace is shown in editor

Screenshots

Additional context

🐛 Characters with accented names not detected as the character token

Describe the bug

If a characher has an accent in their name, it is not detected as a character.

What's the expected result?

If a character's name is written in cap locks, but contains an accent (ex: ÉTIENNE), it will not be centered as well as the subsequent dialogue.

Steps to reproduce the behavior

write :

ÉTIENNE
Hello, my name is Étienne.

and you will see the problem.

Fountain Editor - Plugin Version

v1.1.1

Obsidian Version

v1.5.3

What environment are you seeing the problem on?

  • MacOS
  • Windows
  • Linux
  • Android
  • iOS

Participation

  • I am willing to submit a pull request for this issue.

🐛 Courier Prime font used for regular markdown text

Describe the bug

In the sample image on the GitHub page, the "regular" markdown text (not fountain syntax) is shown in default font while the fountain text is in courier.

In my file, all body text is rendered in courier.

What's the expected result?

Expect body text that is not fountain syntax to be rendered in default font.

Steps to reproduce the behavior

no special steps needed.

Fountain Editor - Plugin Version

No response

Obsidian Version

No response

What environment are you seeing the problem on?

  • MacOS
  • Windows
  • Linux
  • Android
  • iOS

Participation

  • I am willing to submit a pull request for this issue.

CSS preprocessing step

Describe the task
Preprocess CSS stylesheets for dx

Actually we don't need to have a full build pipeline for js since we already are using esbuild.

Blockers

Expected behavior

  • prefix with .fountain
  • integrate into #8 Deployment pipeline

Deployment pipeline

To build and attach the binaries on each new tag created.
Probably create with GitHub Actions?

Settings: Toggle Live Margins

Describe the task

Configuration setting for left-aligned or live margins (borrowing the term from Highland 2)

Linked Issues

  • RELATED: #num
  • BLOCKED BY: #num
  • BLOCKS: #19

Expected behavior

  • Live Preview: Live Margins (bool)
  • Source Mode: Live Margins (bool)

Screenshots

Additional context

Style Settings

  • file width / alignment
    • (Unset - Full-width, Constrained - Left, Constrained - Center)

🐛 Fountain-formatting stops working after rendering certain embeds

Describe the bug

In Live Preview, when inactiv-ating a line with a certain type of embed, the Fountain formatting stops working. There seems to be no way to bring the formatting back, until you close and reopen the note.

Embed types that don't break

  • most note transclusions
  • png images

Embed types that break:

  • audio files
  • file not found
  • canvas
  • jpg images

When opening the file again, formatting works — but when making that embed line active and then inactive again, formatting breaks.

What's the expected result?

The Fountain-formatting should persist in a fountain-configured note, no matter what the text content may be

Steps to reproduce the behavior

  1. Assign cssclasses: fountain to a note
  2. Type in some generic Fountain content, which should get detected and formatted
  3. Insert an embed type from the list above
  4. Make that line inactive by focusing/selecting somewhere else
  5. Formatting stops working

Fountain Editor - Plugin Version

v1.1.1

Obsidian Version

v1.4.16

What environment are you seeing the problem on?

  • MacOS
  • Windows
  • Linux
  • Android
  • iOS

Participation

  • I am willing to submit a pull request for this issue.

Token: Page break / hr to hook into Obsidian's thematicBreak

Describe the task

Turn Fountain page breaks into hr's.

However, Obsidian's Codemirror extension does some funny things to replace the hr with a Decoration.widget completely. Let's try to hook into their existing logic, rather than coding a brand new one from scratch.

  • Investigate if it is possible to hook into Obsidian's logic

Blocking

Expected behaviour

  • Source
  • Live preview
  • non-active line: will behaves just like native Obsidian hr
  • active line: goes back to "source" text

Screenshots

Additional context

Token: Dual Dialogue

Describe the task

Dual Dialogue in Live Preview

Linked Issues

Expected behavior

  • [ ]

Screenshots

Additional context

Remove conflicting existing markdown formatting classes, overriding them

The Problem

There are Conflicts between Obsidian-flavored Markdown vs Fountain.

For the > Centred Text < and > Forced Transition Fountain token, Obsidian's standard blockquote token is still detected (since it is a > character that starts a line) and so there are unwanted/conflicting HTML classes being applied (these being cm-formatting-quote cm-formatting-quote-1 cm-quote cm-quote-1 as seen in the screenshot below).

Screenshot 2024-01-29 at 3 28 03 PM

Then Fountain's _Underlined Text_ and /* Boneyard */ tokens conflict with Obsidian's native _Italicised Text_ and * Leading-Asterisk Italicised Text formatting tokens.

The Solution

There are at least two ways to solve this:

Overload(?) Obsidian's native markdown formatting

This is the strategy used for this plugin so far: Obsidian-Fountain-Editor is a superset of Obsidian-flavoured Markdown, so we just add styles on top of existing markdown styles. This is good, because we don't need to reinvent inline boldface, section headings, etc. so it makes sense to continue with this

But when it comes to conflicts where we want Obsidian's regular Markdown to be suppressed (like asterisk italicising), we will have to undo those applied HTML classes.

This may be a lot of funky coding with CodeMirror (which is really complex) and may leave a problematically-HTML-structured CodeMirror document (think weird excessive nested span elements)

Disable Obsidian's native markdown formatting

The other option is to modify the standard markdown processor to prevent triggering certain markdown styles like underscore-italicising, so that our plugin can swoop in and cleanly format underscore-wrapped-text as underlined text.

This is definitely trickier as I don't know of a way to disable core behaviour, much less disable it only for particular documents (remember, other notes should get Obsidian's native markdown formatting as normal). And they probably use some lesser-known efficient low-level parser (like Lezer) (I'm using simple regex!) that may also be locked behind closed-source.

But this definitely is the superior long-term strategy, since (1) it makes for a cleaner HTML DOM, which means cleaner CSS targeting (2) finer-tuned CodeMirror control; especially if there's an API to easily + directly style certain tokens, then that also instantly fixes #11.

Task

  • - blockquote
  • - underline
  • - boneyard

Mobile CSS styling

Describe the task

Handle styling for mobile. Make sure utility classes fountain-left and fountain-center don't affect using :not(is-mobile).

Linked Issues

Expected behavior

  • [ ]

Screenshots

Additional context

"Fountain + Longform" Tutorial

Describe the task

Write documentation for details and tips using Fountain with the Longform plugin.

Blocking

Expected behavior

  • intro to longform
  • sample Compile workflow, essentials/defaults
    • Strip Metadata
    • Save as Note to save as .fountain
  • Use cases
    • Remove Comments to write markdown
    • Remove Links to use links in Fountain text

Screenshots

Additional context

Fountain notes incorrectly rendered as links

Describe the bug

Within actions and Dialogue in fountain one can write inline notes using the same syntax that obsidian uses for links (see https://fountain.io/syntax/#notes). I use this a lot in my fountain files. I just tried renaming one of them to .md adding the property and opening it in obsidian. This mostly works great but all notes become links, which is undesirable imho.

What's the expected result?

I would expect notes to be rendered in a different font than normal but more indicative of a comment/note than of a link and of course to not create a note when clicked (indeed it should not be a click target).

Ideally the same syntax within a synopsis should indeed produce a link as usual.

Steps to reproduce the behavior

CleanShot 2024-05-18 at 17 54 58@2x

Fountain Editor - Plugin Version

1.1.4

Obsidian Version

1.5.12

What environment are you seeing the problem on?

  • MacOS
  • Windows
  • Linux
  • Android
  • iOS

Participation

  • I am willing to submit a pull request for this issue.

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.