Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unnecessary /n newlines resulting in a lot of white area in the markdown #130

Open
archit15singh opened this issue Jun 12, 2024 · 2 comments · May be fixed by #150
Open

unnecessary /n newlines resulting in a lot of white area in the markdown #130

archit15singh opened this issue Jun 12, 2024 · 2 comments · May be fixed by #150

Comments

@archit15singh
Copy link

archit15singh commented Jun 12, 2024







On\_Search - Beckn


























































 










 













* Home
* Overview
* Specification Reference
* Build with Beckn
* Projects

 

















 



















* Home
* Overview
* Specification Reference
* Build with Beckn
* Projects

 


## Logistics Specification



* API Reference
	+ Beckn Application Platform
		- On\_Cancel
		- On\_Confirm
		- On\_Init
		- On\_Rating
		- On\_Search
		- On\_Select
		- On\_Status
		- On\_Support
		- On\_Track
		- On\_Update
	+ Beckn Gateway
		- On\_Search
		- Search
	+ Beckn Provider Platform
		- Cancel
		- Confirm
		- Init
		- Rating
		- Search
		- Select
		- Status
		- Support
		- Track
		- Update
* Schema Reference
	+ Ack
	+ AddOn
	+ Address
	+ Agent
	+ Billing
	+ Catalog
	+ Category
	+ Circle
	+ City
	+ Contact
	+ Context
	+ ContextForCancel
	+ ContextForConfirm
	+ ContextForInit
	+ ContextForOn\_cancel
	+ ContextForOn\_confirm
	+ ContextForOn\_init
	+ ContextForOn\_rating
	+ ContextForOn\_search
	+ ContextForOn\_select
	+ ContextForOn\_status
	+ ContextForOn\_support
	+ ContextForOn\_track
	+ ContextForOn\_update
	+ ContextForRating
	+ ContextForSearch
	+ ContextForSelect
	+ ContextForStatus
	+ ContextForSupport
	+ ContextForTrack
	+ ContextForUpdate
	+ Country
	+ DecimalValue
	+ Descriptor
	+ Dimensions
	+ Domain
	+ Duration
	+ Error
	+ Feedback
	+ Fulfillment
	+ Gps
	+ Image
	+ Intent
	+ Item
	+ ItemQuantity
	+ Location
	+ MessageForCancel
	+ MessageForConfirm
	+ MessageForInit
	+ MessageForOn\_cancel
	+ MessageForOn\_confirm
	+ MessageForOn\_init
	+ MessageForOn\_rating
	+ MessageForOn\_search
	+ MessageForOn\_select
	+ MessageForOn\_status
	+ MessageForOn\_support
	+ MessageForOn\_track
	+ MessageForOn\_update
	+ MessageForRating
	+ MessageForSearch
	+ MessageForSelect
	+ MessageForStatus
	+ MessageForSupport
	+ MessageForTrack
	+ MessageForUpdate
	+ Name
	+ Offer
	+ Option
	+ Order
	+ Organization
	+ Payment
	+ Person
	+ Policy
	+ Price
	+ Provider
	+ Quotation
	+ Scalar
	+ State
	+ Tags
	+ Time
	+ Tracking
	+ Vehicle








 






All Docs
Beckn Protocol Specification Reference
Core Specification
Developer Documentation
Infrastructure Layer Specification
Logistics Specification
Logistics Specification
Mobility Specification
Overview
Projects













1. Home
2. Docs
3. On\_Search







 Updated on October 5, 2021 


















 



















* Home
* Overview
* Specification Reference
* Build with Beckn
* Projects

 


## Logistics Specification



* API Reference
	+ Beckn Application Platform
		- On\_Cancel
		- On\_Confirm
		- On\_Init
		- On\_Rating
		- On\_Search
		- On\_Select
		- On\_Status
		- On\_Support
		- On\_Track
		- On\_Update
	+ Beckn Gateway
		- On\_Search
		- Search
	+ Beckn Provider Platform
		- Cancel
		- Confirm
		- Init
		- Rating
		- Search
		- Select
		- Status
		- Support
		- Track
		- Update
* Schema Reference
	+ Ack
	+ AddOn
	+ Address
	+ Agent
	+ Billing
	+ Catalog
	+ Category
	+ Circle
	+ City
	+ Contact
	+ Context
	+ ContextForCancel
	+ ContextForConfirm
	+ ContextForInit
	+ ContextForOn\_cancel
	+ ContextForOn\_confirm
	+ ContextForOn\_init
	+ ContextForOn\_rating
	+ ContextForOn\_search
	+ ContextForOn\_select
	+ ContextForOn\_status
	+ ContextForOn\_support
	+ ContextForOn\_track
	+ ContextForOn\_update
	+ ContextForRating
	+ ContextForSearch
	+ ContextForSelect
	+ ContextForStatus
	+ ContextForSupport
	+ ContextForTrack
	+ ContextForUpdate
	+ Country
	+ DecimalValue
	+ Descriptor
	+ Dimensions
	+ Domain
	+ Duration
	+ Error
	+ Feedback
	+ Fulfillment
	+ Gps
	+ Image
	+ Intent
	+ Item
	+ ItemQuantity
	+ Location
	+ MessageForCancel
	+ MessageForConfirm
	+ MessageForInit
	+ MessageForOn\_cancel
	+ MessageForOn\_confirm
	+ MessageForOn\_init
	+ MessageForOn\_rating
	+ MessageForOn\_search
	+ MessageForOn\_select
	+ MessageForOn\_status
	+ MessageForOn\_support
	+ MessageForOn\_track
	+ MessageForOn\_update
	+ MessageForRating
	+ MessageForSearch
	+ MessageForSelect
	+ MessageForStatus
	+ MessageForSupport
	+ MessageForTrack
	+ MessageForUpdate
	+ Name
	+ Offer
	+ Option
	+ Order
	+ Organization
	+ Payment
	+ Person
	+ Policy
	+ Price
	+ Provider
	+ Quotation
	+ Scalar
	+ State
	+ Tags
	+ Time
	+ Tracking
	+ Vehicle








 






All Docs
Beckn Protocol Specification Reference
Core Specification
Developer Documentation
Infrastructure Layer Specification
Logistics Specification
Logistics Specification
Mobility Specification
Overview
Projects














1. Home
2. Docs
3. On\_Search








A-
A
A+




























## Logistics Specification



* API Reference
	+ Beckn Application Platform
		- On\_Search
		- On\_Select
		- On\_Init
		- On\_Confirm
		- On\_Status
		- On\_Track
		- On\_Cancel
		- On\_Update
		- On\_Rating
		- On\_Support
	+ Beckn Gateway
		- Search
		- On\_Search
	+ Beckn Provider Platform
		- Search
		- Select
		- Init
		- Confirm
		- Status
		- Track
		- Cancel
		- Update
		- Rating
		- Support
* Schema Reference
	+ Ack
	+ AddOn
	+ Address
	+ Agent
	+ Billing
	+ Catalog
	+ Category
	+ Circle
	+ City
	+ Contact
	+ Context
	+ ContextForCancel
	+ ContextForConfirm
	+ ContextForInit
	+ ContextForOn\_cancel
	+ ContextForOn\_confirm
	+ ContextForOn\_init
	+ ContextForOn\_rating
	+ ContextForOn\_search
	+ ContextForOn\_select
	+ ContextForOn\_status
	+ ContextForOn\_support
	+ ContextForOn\_track
	+ ContextForOn\_update
	+ ContextForRating
	+ ContextForSearch
	+ ContextForSelect
	+ ContextForStatus
	+ ContextForSupport
	+ ContextForTrack
	+ ContextForUpdate
	+ DecimalValue
	+ Descriptor
	+ Dimensions
	+ Domain
	+ Duration
	+ Error
	+ Feedback
	+ Fulfillment
	+ Gps
	+ Image
	+ Intent
	+ Item
	+ ItemQuantity
	+ Location
	+ MessageForCancel
	+ MessageForConfirm
	+ MessageForInit
	+ MessageForOn\_confirm
	+ MessageForOn\_init
	+ MessageForOn\_rating
	+ MessageForOn\_search
	+ MessageForOn\_select
	+ MessageForOn\_status
	+ MessageForOn\_support
	+ MessageForOn\_track
	+ MessageForOn\_update
	+ MessageForRating
	+ MessageForSearch
	+ MessageForSelect
	+ MessageForStatus
	+ MessageForSupport
	+ MessageForTrack
	+ MessageForUpdate
	+ Name
	+ Offer
	+ Option
	+ Order
	+ Organization
	+ Payment
	+ Person
	+ Policy
	+ Price
	+ Provider
	+ Quotation
	+ Scalar
	+ State
	+ Tags
	+ Time
	+ Tracking
	+ Vehicle
	+ MessageForOn\_cancel
	+ Country










Home » Logistics Specification » API Reference » Beckn Application Platform » On\_Search

 
1. Home
2. Docs
3. 








A-
A
A+








# On\_Search

 

> Send catalog


## Overview



> The BPP will send the catalog of logistics options matching the search intent to the BAP.


## Request


### URL



> /on\_search


### Method



> *POST*


### Request Body Schema




| **Field** | **Type** |
| --- | --- |
| context\* | ContextForOn\_search |
| message.catalog | { Catalog } |
| error | Error |


### Request Body Example


archit15singh added a commit to archit15singh/python-markdownify that referenced this issue Jun 12, 2024
@archit15singh
Copy link
Author

if someone needs the fix for this, I have it on my forked repo
archit15singh@a168c22

@amircohere
Copy link

Not sure if that solution is safe, for example wouldn't it mangle <pre> tags?

jsm28 added a commit to jsm28/python-markdownify that referenced this issue Oct 3, 2024
This fixes various issues relating to how input whitespace is handled
and how wrapping handles whitespace resulting from hard line breaks.

This PR uses a branch based on that for matthewwithanm#120 to avoid conflicts with
the fixes and associated test changes there.  My suggestion is thus
first to merge matthewwithanm#120 (which fixes two open issues), then to merge the
remaining changes from this PR.

Wrapping paragraphs has the effect of losing all newlines including
those from `<br>` tags, contrary to HTML semantics (wrapping should be
a matter of pretty-printing the output; input whitespace from the HTML
input should be normalized, but `<br>` should remain as a hard line
break).  To fix this, we need to wrap the portions of a paragraph
between hard line breaks separately.  For this to work, ensure that
when wrapping, all input whitespace is normalized at an early stage,
including turning newlines into spaces.  (Only ASCII whitespace is
handled this way; `\s` is not used as it's not clear Unicode
whitespace should get such normalization.)

When not wrapping, there is still too much input whitespace
preservation.  If the input contains a blank line, that ends up as a
paragraph break in the output, or breaks the header formatting when
appearing in a header tag, though in terms of HTML semantics such a
blank line is no different from a space.  In the case of an ATX
header, even a single newline appearing in the output breaks the
Markdown.  Thus, when not wrapping, arrange for input whitespace
containing at least one `\r` or `\n` to be normalized to a single
newline, and in the ATX header case, normalize to a space.

Fixes matthewwithanm#130
(probably, not sure exactly what the HTML input there is)

Fixes matthewwithanm#88
(a related case, anyway; the actual input in matthewwithanm#88 has already been fixed)
@jsm28 jsm28 linked a pull request Oct 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants